sizeWithFont弃用了ERROR,如何修复?

时间:2015-05-11 13:36:52

标签: objective-c ios7 sizewithfont

我尝试使用sizeWithAtrributes,但它只是打破了,不确定我做错了这是出现的错误sizeWithFont:minFontSize:actualFont:forWidth:lineBreakMode:在iOS7中已弃用:

if (theRect.size.width > self.bounds.size.width - rightIconNeeds - leftIconNeeds) {
    CGFloat finalSize = realLabel.font.pointSize;
    theRect.size = [realLabel.text sizeWithFont:realLabel.font
                                    minFontSize:realLabel.font.pointSize * realLabel.minimumScaleFactor
                                 actualFontSize:&finalSize
                                       forWidth:self.bounds.size.width - rightIconNeeds - leftIconNeeds
                                  lineBreakMode:realLabel.lineBreakMode];
}

0 个答案:

没有答案