6.1 UIView属性的具体用法

首尾式动画

// beginAnimations表示此后的代码要“参与到”动画中

[UIView beginAnimations:nil context:nil];

// setAnimationDuration用来指定动画持续时间

[UIView setAnimationDuration:2.0];

self.headImageView.bounds = rect;

......

// commitAnimations,将beginAnimation之后的所有动画提交并生成动画

[UIView commitAnimations];

代码示例

//设置首尾动画

[UIView beginAnimations:nil context:nil]; 
self.headImageView.bounds=bounds;
 [UIView setAnimationDuration:2.0];
 [UIView commitAnimations];

 属性补充

    • self.shopsView.clipsToBounds = YES;
      裁剪属性。内容和子视图省略视图的范围,默认是否定的。
posted @ 2016-09-02 13:35  <瑾瑜>  阅读(122)  评论(0)    收藏  举报