I want to create a UIButton programmatically with a title below the image.
Button size: 170 * 120 Imge size: 50 * 50 Title size: depends on the text.
I know what I need to use, but I do not know how:
[_button setTitleEdgeInsets:UIEdgeInsetsMake(0.f, 0.f, 0.f, 0.f)]; [_button setImageEdgeInsets:UIEdgeInsetsMake(0.f, 0.f, 0.f, 0.f)];
I think I should calculate the size of the header and then use EdgeInsets.
Thanks.
source share