首页 > 移动平台 > 详细

iOS开发技巧——Autolayout动画

时间:2015-04-17 01:02:29      阅读:191      评论:0      收藏:0      [点我收藏+]

 

 

 

使用Autolayout时需要在动画的代码前面后面添加

layoutIfNeeded方法

Animation

AutoLayout也可以配合传统的animation方法,整体代码结构如下。

   1:  [self.view layoutIfNeeded]; 
   2:  [UIView animateWithDuration:0.3f 
   3:                   animations:^{ 
   4:                      //... update constraints    
   5:                     [self.view layoutIfNeeded]; 
   6:                   }]; 

 

 

x

iOS开发技巧——Autolayout动画

原文:http://www.cnblogs.com/zeyang/p/4433751.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!