How to add image as button in objective c?
10,232
You can disable the highlighting effect by using
self.tutorialButton.adjustsImageWhenHighlighted = NO;
Comments
-
Vannian almost 2 years
I want to add image as button, and when it is clicked it should open a new view controller... Does anyone know how to do?
I created a button and added image, but its not nice, because when I click on the image it animates a square arround the image, which I do not want. This what I did.
- (void)setTutorialButtonImage { [self.tutorialButton setImage:[UIImage imageNamed:@"app_logo.png"] forState:UIControlStateNormal]; }
Does any one know how to do... just an image and when I click on it start a new controller
-
CainaSouza about 11 yearsIt's the way you did... How was the button presented? Did you set it as UIButtonTypeCUstom?
-
Fonix about 11 yearsyou could just put an image with a blank button above it
-
iiFreeman about 11 yearsjust do UIButton with custom style, do set adjustsImageWhenHighlighted to NO and maybe use touch down control event instead of touch up
-