iOS开发技巧——Autolayout动画
2015-04-17 00:30
295 查看
使用Autolayout时需要在动画的代码前面后面添加
layoutIfNeeded方法
Animation
AutoLayout也可以配合传统的animation方法,整体代码结构如下。
[self.view layoutIfNeeded];
[code][UIView animateWithDuration:0.3f
animations:^{
//... update constraints
[self.view layoutIfNeeded];
}];
[/code]
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
x
相关文章推荐
- 【iOS开发-113】在storyboard上用AutoLayout,纯代码实现AutoLayout布局方法以及简单动画
- iOS开发——使用Autolayout弹出键盘
- iOS开发——使用基于Autolayout的ScrollView
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发技巧(autolayout自动布局)
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发技巧之autolayout自动布局
- 【iOS开发-113】在storyboard上用AutoLayout,纯代码实现AutoLayout布局方法以及简单动画
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发技巧(系列十五:autolayout自动布局)
- iOS开发笔记--使用Auto Layout中的VFL(Visual format language)--代码实现自动布局
- ios开发之autolayout 第三方框架Masonry
- iOS 7应用开发公开课笔记 L9:Animation and Autolayout
- (0073)iOS开发之核心动画高级技巧
- [置顶] 【iOS开发】Mansory自动布局(autolayout)使用教程
- iOS开发之Auto Layout入门
- 66.iOS AutoLayout自动布局中级开发教程(1)-浅谈autolayout
- iOS AutoLayout自动布局中级开发教程(6)-淘宝客户端iPhone 6/6 Plus 设计·适配方案