You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Swift manual views layouting without auto layout, no magic, pure code, full cont
43
43
* Concise syntax. Layout most views using a single line.
44
44
45
45
* Stateless
46
-
* The layout system doesn’t add any stored properties to UIViews. It simply computes the UIView.frame property, one view at a time.
46
+
* PinLayout doesn’t add any stored properties to UIViews. It simply computes the UIView.frame property, one view at a time.
47
47
* Since it is stateless, it can be used with any other layout framework without conflicts.
48
48
Each view can use the layout system that better suit it (PinLayout, constraints, flexbox, grids, …)
49
49
A view can be layouted using PinLayout and later with another method/framework.
@@ -55,6 +55,8 @@ A view can be layouted using PinLayout and later with another method/framework.
55
55
56
56
* Before applying the new sets of attributes, PinLayout always start with the view’s current frame. So it’s possible to set the view’s size during the initialization (ex: view.pin.width(100).height(200)), and later only position the view (ex: view.pin.top(10).left(20)). This makes PinLayout really animation friendly.
57
57
58
+
* Not too intrusive. PinLayout only adds three properties to existing iOS classes: `UIView.pin`, `UIView.anchor` and `UIView.edge`
59
+
58
60
* Minimize as much as possible calculations and constants when layouting views.
59
61
60
62
* Methods match as much as possible other layouting systems, including CSS, flexbox, reactive Flexbox, …
:pushpin: This example and some other examples are available in the **PinLayoutSample** project. Please note that you must do a `pod install` before running the sample project.
124
+
121
125
<br/>
122
126
123
127
@@ -692,6 +696,30 @@ Warnings can be disabled in debug mode too by setting the boolean PinLayoutLogCo
692
696
693
697
<br/>
694
698
699
+
## PinLayout style guide
700
+
701
+
* You should always specifies methods in the same order, it makes layout lines easier to understand. Here is our prefered ordering:
0 commit comments