Reputation: 23
I'm a noob having trouble rounding the corners of my buttons using interface builder in Xcode 6. I added a new User Defined Runtime Attribute (layer.cornerRadius) as per the below instructions: https://stackoverflow.com/a/25164977/2903220
Unfortunately when I run the app there is no change in the button.
All other answers I've found say to do the same thing, yet it's not working. My questions is are there other settings I should check which may cause this to not work? (maybe it's better to do it programatically?!)
Please help! Thanks!
Upvotes: 0
Views: 62
Reputation: 158
button.clipsToBounds = YES;
button.layer.cornerRadius = 20;//half of the width
button.layer.borderColor=[UIColor redColor].CGColor;
button.layer.borderWidth=2.0f;
Upvotes: 1