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
- [Working with dynamic UICollectionView/UITableView/UITextView](#workingwithdynamicuicollectionviewuitableviewuitextview)
57
+
-[Using plain UIViews instead of view controllers](#lightweightplainuiview)
56
58
- [Rows Separator](#rowsseparator)
57
59
- [Tap On Rows](#taponrows)
58
60
- [Get the row/controller](#utilsmethods)
@@ -500,6 +502,27 @@ Moreover you can set these values directly on `ScrollStack` controller in order
500
502
501
503
[↑ Back To Top](#index)
502
504
505
+
<aname="lightweightplainuiview"/>
506
+
507
+
### Using plain UIViews instead of view controllers
508
+
509
+
Since version 1.3.x ScrollStack can also be used to layout plain `UIView` instances which not belong to a parent view controllers.
510
+
This is especially useful when you don't have a complex logic in your views and you want to use ScrollStack to make custom layout and keep your code lightweight.
511
+
512
+
Using plain views is pretty easy; each row method supports both `UIView` or `UIViewController` as parameter.
513
+
514
+
Since you are working with plain `UIView` instances in order to size it correctly you must set its `heightAnchor` or `widthAncor` (depending of your stack orientation) before adding it to the stack.
515
+
As for controllers, `ScrollStack` keeps a strong reference to the managed view which is added as `contentView` of the parent `ScrollStackRow` instance as it happens for `UIViewController`'s `.view` property.
0 commit comments