开发者

Zoom UIView by using CGAffineTransformMakeScale and white background

开发者 https://www.devze.com 2023-01-11 12:31 出处:网络
I try to scale an UIView. And there is a white background outside of an UIview. How I can take it out to see just background view? Thanks!

I try to scale an UIView. And there is a white background outside of an UIview. How I can take it out to see just background view? Thanks!

self.view.transform = CGAffineTransformMakeScale(.5,.5);
[UIView beginAnimations:nil co开发者_开发问答ntext:NULL];
[UIView setAnimationDuration:0.9];
self.view.transform = CGAffineTransformMakeScale(1,1);
[UIView commitAnimations];


Try setting the background color of the view you need to be transparent to [UIColor clearColor]:

myView.backgroundColor = [UIColor clearColor];
0

精彩评论

暂无评论...
验证码 换一张
取 消