In my nib file I have chosen one custom button and I want to set its corner radius. I have linked in the QuartzCore framework and then write the following code to set its corner radius
[[btnPressureLink layer] setCornerRadius:15.0];
and when I add a background colour for the button the corner radius is set but when I put an image on the button the corner radius does not get set. What should I do to set the corner radius when an image is used on the button?
Try
btnPressureLink.layer.cornerRadius = 15.0;
[btnPressureLink.layer setMasksToBounds:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With