I have an UIButton made with IB, it is set to "Rounded Rect". At one point, I'd like to change the type to "Custom" in the code, is that possible ? I saw the type can be set at creation, but did not see if it was possible to change it later on.
If I'm not mistaken, different button types are represented by different (private) subclasses of UIButton. That's why you can only set type at creation time but not after.
I don't know if I'll be much help, but for me it worked by doing:
button = [UIButton buttonWithType:(UIButtonType)];
example:
calculateButton = [UIButton buttonWithType: UIButtonTypeRoundedRect];
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