NSAttributedString对自动调整异常无效

Lol*_*pop 0 xcode ios xcode4.2 ios6

我正在尝试使用NSAttributedString来显示UILabel,我使用自动换行作为换行模式.但是当我运行应用程序时,它会抛出异常" NSAttributedString invalid for autoresizing, it must have a single spanning paragraph style (or none) with a non-wrapping lineBreakMode."

有人可以建议我如何解决这个问题吗?

Sha*_*ssy 8

要修复,请设置:

[yourLabel setAdjustsFontSizeToFitWidth:NO];
Run Code Online (Sandbox Code Playgroud)

请确保稍后在代码中不要覆盖它;)