Search code examples
iosiphoneios6ios7uibutton

UIButton background Image in IOS7


I am setting my background image for UIButton, it's working fine for iOS6 but for highlighted state in iOS7 not working.

[clearButton setBackgroundImage:[UIImage imageNamed:@"[email protected]"] forState:UIControlStateHighlighted];

[clearButton setBackgroundImage:[UIImage imageNamed:@"btn@2x~ipad.png"] forState:UIControlStateNormal];

What could be the problem?


Solution

  • Rana Anees: Please restart your simulator ;-)