ComposableLayout let you to make complex layouts with their own view controllers and their life cycles! It uses UIScrollView in order to make contents horizontally scrollable.
To run the example project, clone the repo, and run pod install
from the Example directory first.
First create a ComposableLayoutView and give it a frame value where you want to add. Make sure given view controller conform HeightIdentifiableViewController
and use contentHeight
value to notify ComposableLayoutView its content height.
let composableView = ComposableLayoutView(frame: view.bounds)
composableView.embed(in: self, viewControllers: [ItemsListScrollableViewController(),
OnboardViewController(),
ItemsListScrollableViewController(),
OnboardViewController(),
ItemsListScrollableViewController(),
OnboardViewController(),
ItemsListScrollableViewController()])
ComposableLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'composablelayout'
- Supporting removing content from the list
- Supporting horizontal scrolling
- Adding Carthage support
- Auto resizing scroll view based on content
- Add more examples and screenshots
Serhat Sezer, @serhatsezer
composablelayout is available under the MIT license. See the LICENSE file for more info.