标题标签UIBUtton
上有一个很小的边框,UILabels
不存在。
[self.button setTitle:@"border" forState:UIControlStateNormal] ;
[self.button setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal] ;
self.label.text = @"no borders!"
self.label.textColor = [UIColor yellowColor] ;
由于此边框,带有浅色的UIButton
看起来很“脏”。
它是什么以及如何删除它?
答案 0 :(得分:5)
这些是UIButton
的标题文字边框阴影。
默认情况下,按钮看起来像深灰色。
点击阴影颜色并将其更改为清除颜色
您也可以使用以下代码以编程方式完成此操作:
[self.button setTitleShadowColor:[UIColor clearColor] forState:UIControlStateNormal] ;