3
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.titleLabel.shadowColor = [UIColor blackColor];
btn.titleLabel.shadowOffset = CGSizeMake(1, 1);
当我在ios7上运行这个按钮时,该按钮根本没有阴影。给你的建议。iOS:UIButton的标题阴影颜色不起作用
u可以使用层为 –
要在按钮添加阴影或按钮标题? – mengxiangjian
[Uibutton titlelabel shadowoffset属性在ios 7中的行为不正确]的可能的重复(http://stackoverflow.com/questions/19142652/uibutton-titlelabel-shadowoffset-property-is-not-behaving-properly-in-ios- 7) – rmaddy