Programmatic iOS Auto Layout

from blog lmno.lol @alvaro, | ↗ original
Basic iOS auto layout usage. See Adopting Auto Layout and Visual Format language for reference. - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Disable autoresizing mask translation for parent. self.translatesAutoresizingMaskIntoConstraints = NO; _subview1 = [[UIView alloc]...