AutoLayout is introduced in Xcode 4, but only in Xcode 5 it is being used well, and it becomes something we have to know as iOS Developers.

FLKAutoLayout = automatically add constraints to the nearest common superview for the views involved.


Content Compression and Hugging  

  1. To make a view resist being resized larger than the content it has: max contentHugging (the strength it resists being made larger than content)                                                                 setContentHuggingPriority:NSLayoutPriorityRequired forOrientation:NSLayoutConstraintOrientationHorizontal];
  2. setContentCompressionResistancePriority: contentCompression is the strength it resists being made smaller than the content it has. If we make this small (NSLayoutPriorityDefaultLow) then it won’t resist and can be made smaller than content.