-1
我试图为我的某些标签添加删除线。 我的项目支持32位和64位。 在iOS 8上一切正常,但在iPhone 5c上的iOS 7上,标签消失。 这是我的代码:添加属性文本隐藏UILabel
NSMutableAttributedString *throughLineAttributeString = [[NSMutableAttributedString alloc] initWithString:label.text];
[throughLineAttributeString addAttribute:NSStrikethroughStyleAttributeName
value:@1
range:NSMakeRange(0, [throughLineAttributeString length])];
label.attributedText = throughLineAttributeString;
我在做什么错?
添加label.layer.borderWidth = 3;并检查,它消失了还是只是什么都没有显示 – mityaika07 2014-12-03 11:50:14
是的标签仍然存在于同一帧。似乎只是文本丢失。 – YogevSitton 2014-12-03 12:34:19
ok,设置label.layer.masksToBounds = NO,并检查文本位置 – mityaika07 2014-12-03 12:36:13