Fred Novack
Fred Novack

Reputation: 811

IOS 7 Button Background Does Not Work

I have a project that comes from IOS6, and now with the button changes of the IOS7 I had to make a background to my project buttons. Although, when I try to set a background image for my buttons it doesn't work! programming or not it doesn't work!

I tryied:

[buttonOutlet setBackgroundImage:[UIImage imageNamed:@"lineStyleScreen.png"] forState:UIControlStateNormal];

and the IDE! BOTH DONT WORK!!!

I wonder if it is because I did't updated my storyboard to IOS7.

Upvotes: 0

Views: 2618

Answers (3)

gunas
gunas

Reputation: 1907

ios 7 doesnt support regular ios 6 buttons. Do follow this link:

http://dev.iachieved.it/iachievedit/?p=127

Upvotes: 1

Ekra
Ekra

Reputation: 3301

Try to set the tint color to the button for iOS 7

  button.tintColor = [UIColor greenColor];

Note:- set the tint color that will suit to your requirement

Upvotes: 0

kgu87
kgu87

Reputation: 2057

Is the button type set to Custom in properties inspector?

Upvotes: 1

Related Questions