Reputation: 46370
Programmatically, and not with using xib files? UIView's autoresizingMask is not really the right thing, I think. Since it's not about resizing but laying out. I couldn't find layout masks. But Interface Builder seems to allow to attach a view to top, left, right, center or bottom. So there must be a mechanism.
Upvotes: 2
Views: 651
Reputation: 350
https://developer.apple.com/documentation/uikit/uiview/1622559-autoresizingmask
[view setAutoresizingMask: UIViewAutoresizingFlexibleTopMargin];
Upvotes: 6