摘要: 在使用Autolayout时有时候会有莫名其妙的错误,是因为UIView是默认同时开启Autoresizing和Autolayout的。 但我们的Autolayout很容易和Autoresizing冲突,所以一般我们在使用Autolayout时要手动关闭Autoresizing。 方法为: [self.view setTranslatesAutoresizingMaskIntoConstra... 阅读全文
posted @ 2015-04-17 00:33 有奈了 阅读(812) 评论(0) 推荐(0) 编辑
摘要: 使用Autolayout时需要在动画的代码前面后面添加 layoutIfNeeded方法 Animation AutoLayout也可以配合传统的animation方法,整体代码结构如下。 1: [self.view layoutIfNeeded]; 2: [UIView animateWithDuration:0.3f 3... 阅读全文
posted @ 2015-04-17 00:30 有奈了 阅读(673) 评论(0) 推荐(0) 编辑