相关疑难解决方法(0)

何时在Mac/iPhone上使用CALayer?

我有点困惑何时在iPhone或Mac上使用CALayer以及何时不使用它?CoreAnimation可以在我的基于UIView的对象上正常工作,而无需使用CALayer.何时适合挖掘这门课程?

iphone cocoa cocoa-touch core-animation objective-c

22
推荐指数
2
解决办法
6974
查看次数

当高度大于8192时,UILabel视图消失

将大字符串分配给UILabel.并且,将此标签添加到滚动视图中.
当UILabel高度大于8192pt(即2 ^ 13)时,UILabel消失.

这是iOS错误吗?

我应该使用其他实现来呈现这么多的字符串吗?
我应该使用带有单元格的表视图吗?

UPDATE

将显示UILabel的代码:

UILabel *label = [[UILabel alloc] init];
label.backgroundColor = [UIColor clearColor];
label.text = rumor.displayText;
label.frame = CGRectMake(0, 0, self.view.frame.size.width, 8192);
label.lineBreakMode = UILineBreakModeWordWrap;
label.numberOfLines = 0;
Run Code Online (Sandbox Code Playgroud)

UILabel确实消失的代码

UILabel *label = [[UILabel alloc] init];
label.backgroundColor = [UIColor clearColor];
label.text = rumor.displayText;
label.frame = CGRectMake(0, 0, self.view.frame.size.width, 8193);
label.lineBreakMode = UILineBreakModeWordWrap;
label.numberOfLines = 0;
Run Code Online (Sandbox Code Playgroud)

uilabel ios

8
推荐指数
1
解决办法
1463
查看次数

标签 统计

cocoa ×1

cocoa-touch ×1

core-animation ×1

ios ×1

iphone ×1

objective-c ×1

uilabel ×1