I want an image and text "View Details" in my button(red color button) programmatically... image is on left side of button and text on right side..
UIImage *img = [UIImage imageNamed:@"image.png"];
[aButton setImage:img forState:UIControlStateNormal];
aButton.backgroundColor=[UIColor redColor];
//[img release]; i am not sure i release it or not
//[testBtn setTitleEdgeInsets:UIEdgeInsetsMake(70.0, -150.0, 5.0, 5.0)];
// what the above lines line work?
[aButton setTitle:@"View Details" forState:UIControlStateNormal];
I see the button but not, red color button...only red color corners...