ios - UIButton border disappears -
i'm designing new button app, i'd avoid coding have use same button style through app. added attributes , works fine, when add border color (doesn't matter color) no reason border disappears. going on? 
you can not set properties of view's layer through interface builder. can set layer's borderwidth , cornerradius via interface builder tool of xcode, not able set bordercolor using interface builder , it's because layer.bordercolor wants cgcolor instead of uicolor. , unfortunately, there's no way assign cgcolorref type in interface builder.
you can programmatically set button's border color on layer as-
[[button layer] setbordercolor:[uicolor redcolor].cgcolor];
Comments
Post a Comment