layoutSubviews is a method that is called automatically during view size changes. It can be used by a custom view to perform additional manual changes above and beyond any autoresizing behaviours
This method is called automatically and should not be called directly. UIKit will call it automatically whenever a view size changes. This could be as a result of resizing due to orientation changes. For example when the user rotates the iOS device to portrait or landscape mode.
In the custom view that implementslayoutSubviews
, any view changes in addition to the autoresizing behaviours should be applied.
For further information please refer to the View Programming Guide for iOS. See the section on "Tweaking the Layout of Your Views Manually".
See also the UIView Class Reference.