UIView详解3
Asks the view to calculate and return the size that best fits its subviews.
- (CGSize)sizeThatFits:(CGSize)sizeParameters- size
The current size of the receiver.
Return Value
The current size of the receiver.
A new size that fits the receiver’s subviews.
5. sizeToFitResizes and moves the receiver view so it just encloses its subviews.
- (void)sizeToFit得到最适合当前字数的尺寸,