I also had a similar problem, make sure that the button in the interface builder is set to user, because if it is not, you will see rounded corners.
Also, something useful that I found when working with images was UIEdgeInsets. Therefore, I could make such a special custom button.
UIButton * customButton = [UIButton buttonWithType:UIButtonTypeCustom]; [customButton setBackgroundImage:[[UIImage imageNamed:@"customerImage.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(1, 4, 2, 4)] forState:UIControlStateNormal];
But with any image you can use resizableImageWithCapInsets. I would recommend reading this to make sure that you can configure it correctly, but even if this does not help you understand that it may help you later.
Apple Doc Just Control F for Resizable
Hope this helps ^ _ ^
ps However, rounded corners will work if you try this and it doesnβt work, make sure you import Quartzcore. I often forget this step and become longing until I can understand it. Good luck anyway!
source share