Possible Duplicate:
UIButton title and image alignment query
I need to implement UIButton show in below image
please help me how to implement
Thanks, Prasad
Have a look to the titleEdgeInsets
property of UIButton.
@property(nonatomic) UIEdgeInsets titleEdgeInsets
Use the below approach to get both with the UIButton .
[myButton setImage: [UIImage imageNamed:@"settingImage.png"] forState:UIControlStateNormal];
[myButton setTitleEdgeInsets:UIEdgeInsetsMake(100.0, -100.0, 10.0, 15.0)];
[myButton setTitle:@"settings" forState:UIControlStateNormal];
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