sizeWithFont:constrainedToSize:lineBreakMode:
CGSize expectedLabelSize =
[text sizeWithFont:label.font
constrainedToSize:maximumLabelSize
lineBreakMode:label.lineBreakMode];
修改為
CGSize expectedLabelSize =
[text boundingRectWithSize:maximumLabelSize
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName: label.font}
context:nil].size;
sizeWithFont:
CGSize sizetmp = [text sizeWithFont:font];
iOS7
CGSize sizetmp = [text sizeWithAttributes:@{NSFontAttributeName: font}];
dismissModalViewControllerAnimated:
[self.navigationController dismissModalViewControllerAnimated:YES];
iOS7
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
contentSizeForViewInPopover
|
preferredContentSize
|
UITextAttributeTextColor
|
NSForegroundColorAttributeName
|
UIStatusBarStyleBlackOpaque
UIStatusBarStyleBlackTranslucent |
UIStatusBarStyleLightContent
|
|
|
UILineBreakModeWordWrap
|
NSLineBreakByWordWrapping
|
UILineBreakModeCharacterWrap
|
NSLineBreakByCharWrapping
|
UILineBreakModeClip
|
NSLineBreakByClipping
|
UILineBreakModeHeadTruncation
|
NSLineBreakByTruncatingHead
|
UILineBreakModeTailTruncation
|
NSLineBreakByTruncatingTail
|
UILineBreakModeMiddleTruncation
|
NSLineBreakByTruncatingMiddle
|
沒有留言:
張貼留言