Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom UIButton image buttontype

If you can set a button's image even if it's button type is rounded rectangle, then what is the purpose of the button type to begin with? I usually use the custom button type, but does this in fact actually make a difference?

like image 384
johnbakers Avatar asked Aug 21 '26 09:08

johnbakers


1 Answers

You can use UIButtonType to make a button of a standard type: a detail disclosure, an info, and so on. In these cases you would not need to set the image at all - the system will do it for you automatically.

When you pick rounded rectangle and set the image, the image would be clipped to the rounded rectangle's border; when you pick custom style, there will be no clipping.

like image 131
Sergey Kalinichenko Avatar answered Aug 24 '26 09:08

Sergey Kalinichenko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!