How can I align a UIView to the bottom of the parent so that the Y coordinate of the frame is relative to the bottom of the screen instead of the top?
This would be the equivalent to setting the .bottom property in HTML.
This is because I want to make sure my view is always at the bottom of window regardless of the height of the parent.
This should do the trick
You can set the autoresizing mask values on the Sizing pane in XIB or Storyboard editor.
Once you have initially positioned the view by setting its
frame
property, adjust itsautoresizingMask
to includeUIViewAutoresizingFlexibleTopMargin
. That will keep it anchored to the bottom of its superview.