简单创建布局约束功能源码
源码FLKAutoLayout,FLKAutoLayout是一个UIView category,可以在代码中简单创建布局约束。FLKAutoLayout可使用易于阅读的语法来创建简单的约束,并提供很多便捷的方法一次性在多个视图间创建复杂的约束。 FLKAutoLayout is a category on UIView which makes it easy to setup layout constraints in code. FLKAutoLayout creates simple constraints with a readable syntax and provides many convenience methods to setup more complex constraints between multiple views at once. It automatically adds the constraints to the nearest common superview of the views involved and sets the translatesAutoresizingMaskIntoConstraints property on those views to NO. FLKAutoLayout provides methods on UIView instances for simple layout constraints like width and height or constraining an edge of one view to another. Furthermore it provides methods on the UIView class for more complex layout constraints where more than two views are involved. For some examples of how to setup constraints please check the example project.
用户评论