Skip to content

Instantly share code, notes, and snippets.

@arpit
Created August 19, 2015 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arpit/d9b5192104c119663654 to your computer and use it in GitHub Desktop.
Save arpit/d9b5192104c119663654 to your computer and use it in GitHub Desktop.

Figured out my layout issue: I had set the frame on a UIView and added it to a parent view. Under the hood, iOS translated the frame rectangle to constraints (cause I hadn't set "setTranslatesAutoresizingMaskToConstraints" to false). So when the parent view was resized later, the child view stretched along with it. Unlike the default behavior views with frames set that just stay that size regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment