sizeToFit方法,是UIView的一个系统方法,苹果文档如下描述:
- (void)sizeToFit |
|
Description |
Resizes and moves the receiver view so it just encloses its subviews. |
|
Call this method when you want to resize the current view so that it uses the most appropriate amount of space. Specific UIKit views resize themselves according to their own internal needs. In some cases, if a view does not have a superview, it may size itself to the screen bounds. Thus, if you want a given view to size itself t |