doggy

2pods

Masonry-FlattenLayout

Masonry is good and this extension makes it better!

Previously, an relative layout is a point to point assignment. An example for the view1's masmake: - make.right.equalTo(view2.masleft).offset(-10) The right layout constraint of view1 are considered with particular edge, not with particular view. The .offset(-10) is similar so we need thinking its value should be whether positive nor negative.

  • equalTill(), provides a view based assignment method in flatten layout make.right.equalTill(view2) is same as make.right.equalTo(view2.masleft) The magic of this mechanism work is .equalTill() will lookup the firstLayoutAttribute of contraint and deciding which secondLayoutAttribute should be. Also, make.top.equalTill(view2) is same as make.top.equalTo(view2.masbottom)

  • gap(), provide a view based offset value make.right.equalTo(view2.masleft).gap(10) is same as make.right.equalTo(view2.masleft).offset(-10)

Seen that? View based flatten layout gives you an easier life! You won't confusing which edge is need in relative layout and it autocompleted with equalTill()

One more, make the combination (of course you can): make.right.equalTill(view2).gap(10)

License: MIT

  • Objective C

ZKRefresh

A high performance Pull-to-refresh component, based on MJRefresh 3.1.12 but re-wrote all codes almostly

License: MIT

  • Objective C