I was trying to create a custom button, but after setting the image, I noticed that the title disappears, it think this is because I add an image to the button, which overlaps the title.
UIImage *pickerBg = [UIImage imageNamed:@"btn_picker.png"];
UIImage *pickerBg_highlighted = [UIImage imageNamed:@"btn_picker_highlighted.png"];
[projectBtn setImage:pickerBg forState:UIControlStateNormal];
[projectBtn setImage:pickerBg_highlighted forState:UIControlStateHighlighted];
Is there another way on how to do this?
Create a UILabel with the title you need, then add it as a subview to your UIButton.