开发者

How to increase size of the ViewImage/View

开发者 https://www.devze.com 2023-03-20 06:51 出处:网络
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 animat

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

精彩评论

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