根据文字计算大小

2016-01-06  本文已影响71人  萝BAIBAI
CGRect rect= [str boundingRectWithSize:CGSizeMake(100, MAXFLOAT) 
                                                  options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading 
                                               attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:20.0]} 
                                                  context:nil]; 
上一篇下一篇

猜你喜欢

热点阅读