【发布时间】:2015-03-06 09:09:20
【问题描述】:
我收到 sizeWithFont: 已弃用的警告,我已尝试将其替换为 sizeWithAttributes: 但我尝试的一切都不起作用。
代码应该告诉我 UILabel 的预期大小,而 cCell 是单元格和来自 IB 的标签。
感谢您的所有帮助。
CGSize maximumLabelSize = CGSizeMake(210, FLT_MAX);
expectedLabelSize = [labelText sizeWithFont:cCell.lblHotelResponse.font constrainedToSize:maximumLabelSize lineBreakMode:cCell.lblHotelResponse.lineBreakMode];
【问题讨论】:
标签: ios xcode cocoa-touch ios7