读书人

UIView详解三

发布时间: 2013-09-06 10:17:17 作者: rapoo

UIView详解3

Asks the view to calculate and return the size that best fits its subviews.

- (CGSize)sizeThatFits:(CGSize)size
Parameters
size

The current size of the receiver.

Return Value

A new size that fits the receiver’s subviews.

5. sizeToFit

Resizes and moves the receiver view so it just encloses its subviews.

- (void)sizeToFit得到最适合当前字数的尺寸,




读书人网 >移动开发

热点推荐