Created
          July 10, 2021 07:11 
        
      - 
      
 - 
        
Save muukii/63379e9a8d2bc5bed865706c448fbe9c to your computer and use it in GitHub Desktop.  
Revisions
- 
        
muukii created this gist
Jul 10, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ let backgroundView = UIView.mock(backgroundColor: .neon(.violet)) let box1 = UIView.mock(backgroundColor: .neon(.red), preferredSize: .largeSquare) let box2 = UIView.mock(backgroundColor: .neon(.yellow), preferredSize: .largeSquare) view.addSubview(backgroundView) view.addSubview(box1) view.addSubview(box2) mondrianBatchLayout { backgroundView.mondrian.layout.edges(.toSuperview) box1.mondrian.layout .top(.toSuperview, 10) .left(.toSuperview, 10) .bottom(.toSuperview, -10) box2.mondrian.layout .top(.toSuperview, 10) .left(.to(box1).right, 10) .right(.toSuperview, -10) .bottom(.toSuperview, -10) }