开发者

How to increase size of the ViewImage/View

I am facing a problem in increasing the size of imageView/ view.

Actually I want my application to increase the size (0-100) of开发者_如何转开发 image/imageView after clicking a button through animation.

Please Help !!!


You need to create a cgrect and apply that to you view/imageview

here is a code snippet

CGRect previousFrame = view.frame;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5f];
previousFrame.size.width = 100;
previousFrame.size.height = 100;
view.frame = previousFrame;
[UIView commitAnimations];

paste this code on IBAction of your button. Change the code as you want. this is just for understanding the concept.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜