Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put an image and a bottom text together in a UIButton?

I want to put an centered image and a bottom centered text in a UIButton.

How I can do that?

Thanks in advance.

like image 778
reinaldoluckman Avatar asked Jan 27 '26 20:01

reinaldoluckman


1 Answers

Ok, figure out how. Using the methods:

    [button1 setTitleEdgeInsets:UIEdgeInsetsMake(30.0, 0.0, 0.0, 0.0)];
    [button1 setImageEdgeInsets:UIEdgeInsetsMake(-10.0, 29.0, 0.0, 0.0)];
like image 82
reinaldoluckman Avatar answered Jan 29 '26 08:01

reinaldoluckman



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!