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
: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
127
128
+
:pushpin: PinLayout doesn't use auto layout constraints, it is a framework that manually layout views. For that reason you need to update the layout inside either `UIView.layoutSubviews()` or `UIViewController.viewDidLayoutSubviews()` to handle container size's changes, including device rotation. You'll also need to handle UITraitCollection changes for app's that support multitask. In the example above PinLayout's commands are inside UIView's `layoutSubviews()` method.
129
+
125
130
<br/>
126
131
127
132
@@ -773,7 +778,22 @@ Cell D:
773
778
774
779
<br>
775
780
776
-
## Comments, ideas, suggestions, issues, ....
781
+
782
+
## FAQ <aname="faq"></a>
783
+
784
+
***Q: When the device rotation change, the layout is not updated.**
785
+
**R:** PinLayout doesn't use auto layout constraints, it is a framework that manually layout views. For that reason you need to update the layout inside either `UIView.layoutSubviews()` or `UIViewController.viewDidLayoutSubviews()` to handle container size's changes, including device rotation. You'll also need to handle UITraitCollection changes for app's that support multitask.
786
+
787
+
***Q: How to apply percentage from a CGFloat, a Float or a Int value?**
788
+
**R:** Many PinLayout's method has a parameter of type `Percent`. You can easily specify this type of parameter simply by adding the `%` operator to your value (eg: `view.pin.left(10%).width(50%)`. It is similar if you have a value of type CGFloat, Float or Int, simply adds the `%` operator:
0 commit comments