Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自从我在 iOS 8.1.3 上更新 iPad 后,我遇到了一个非常奇怪的问题。在应用程序中的任何地方,如果某些标签需要与多行一起使用(numberOfLines 设置为 0),它会在绘制矩形或 sizeToFit 时崩溃。
这在 iOS7 上运行良好。
这是发生崩溃时的调用堆栈:http: //s16.postimg.org/txnmngglh/Screen_Shot_2015_02_09_at_11_01_41_AM.png
只需取消选中自动布局并重试。
如果您不想取消选中自动布局,只需添加以下行:
Your_TextView.numberOfLines = 0;
希望它对你有用。