NoWar
NoWar

Reputation: 37642

Zoom UIView by using CGAffineTransformMakeScale and white background

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 context:NULL];
[UIView setAnimationDuration:0.9];
self.view.transform = CGAffineTransformMakeScale(1,1);
[UIView commitAnimations];

Upvotes: 1

Views: 1311

Answers (1)

Scott McCoy
Scott McCoy

Reputation: 308

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

myView.backgroundColor = [UIColor clearColor];

Upvotes: 1

Related Questions