iOS学习 bounds

来源:互联网 发布:cf手游刷枪软件注册码 编辑:程序博客网 时间:2024/06/15 16:43

1, 取出bounds

CGRect bounds = self.iconButton.bounds;

2. 调整大小

bounds.size.width += 50;

bounds.size.height += 50;

//--- 在中间添加动画效果

1> 准备开始一个动画

[UIView beginAnimations:nil context:nil];

2> 设置时间间隔

[UIView setAnimationDuration:1.0];

3,重新设置 bounds

selt.iconButton.bounds = bounds

3> 提交动画

[UIView commitAnimations];

0 0