Created
June 10, 2022 10:45
-
-
Save mmackh/8514b7815503c11874f04aa8ef9684df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import BaseComponents | |
class LayoutViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.addSplitView { splitView in | |
splitView.addSplitView(configurationHandler: { splitView in | |
splitView.direction = .horizontal | |
splitView.addSubview(UIView().color(.background, .systemRed), layoutType: .equal) | |
splitView.addSplitView(configurationHandler: { splitView in | |
splitView.addSubview(UIView().color(.background, .systemPurple), layoutType: .equal) | |
splitView.addSubview(UIView().color(.background, .systemMint), layoutType: .equal) | |
}, layoutType: .equal) | |
}, layoutType: .equal) | |
splitView.addSplitView(configurationHandler: { splitView in | |
splitView.direction = .horizontal | |
splitView.addSplitView(configurationHandler: { splitView in | |
splitView.direction = .horizontal | |
splitView.addSubview(UIView().color(.background, .systemOrange), layoutType: .equal) | |
splitView.addSubview(UIView().color(.background, .systemPink), layoutType: .equal) | |
splitView.addSubview(UIView().color(.background, .systemBrown), layoutType: .equal) | |
}, layoutType: .equal) | |
splitView.addSplitView(configurationHandler: { splitView in | |
splitView.addSubview(UIView().color(.background, .systemBlue), layoutType: .equal) | |
splitView.addSubview(UIView().color(.background, .systemCyan), layoutType: .equal) | |
splitView.addSubview(UIView().color(.background, .systemGreen), layoutType: .equal) | |
}, layoutType: .equal) | |
}, layoutType: .equal) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment