Programmatic Auto Layout (part 2 - final!)
The last few videos from this 'workshop'...hopefully it will be less confusing than where we got to last time! Complex Format Strings Pasan talks through the code required for layouts. The benefit is adding several constraints, all in one go! Orientation - horizontal or vertical. Optional as it would default to horizontal. H for horizontal; V for vertical. Leading relationship - superview connection (will come back to) View - this is required. Needs to refer to this. Type of connection - between view and any other view. Trailing relationship - can be optional (again linked to superview). Use of the |..... This is used for showing the superview. Known as the 'pipe' key apparently! "V:|-[redView(viewHeight)]" This is a strange one. NSLayoutConstraint . constraints (withVisualFormat: "H:|-(customHorizontalSpacing)-[redView(viewWidth)]-customHorizontalSpacing-[greenView(redView)]" , options: [], metrics: m...