【发布时间】:2013-10-07 11:58:59
【问题描述】:
请帮我找到弃用方法的替代方法...
CGSize size = [title sizeWithFont:buttonFont
minFontSize:10
actualFontSize:nil
forWidth:_view.bounds.size.width
lineBreakMode:NSLineBreakByClipping];
(boundingRectWithSize:options:attributes:context:) 可以这样做吗?像这样的...
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIFont systemFontOfSize:10], NSFontAttributeName,
nil];
CGSize size = [title boundingRectWithSize:CGSizeMake(_view.bounds.size.width-kBorder*2, _view.bounds.size.height)
options:NSLineBreakByClipping
attributes:attributes
context:nil].size;
我说的对吗? 期待您的建议:)
【问题讨论】:
标签: ios7 sizewithfont