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…
you make image of button having red color and text on it..and set the image on it…
This is the code for setting the image on button..
[but1 setImage:[UIImage imageNamed:@"LeftBack.png"] forState:UIControlStateNormal];//setting image on button.