简体   繁体   中英

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.

属性检查器中的按钮类型是否设置为“自定义”?

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM