Setting UIButton image results in blue button in iOS 7

后端 未结 15 1820
[愿得一人]
[愿得一人] 2020-11-28 20:52

On iOS 6 SDK I wrote the following lines of code to display an image inside a button:

NSURL *thumbURL2 = [NSURL URLWithString:@\"http://example.com/thumbs/2.         


        
15条回答
  •  时光说笑
    2020-11-28 21:01

    This worked for me

    [myButton1 setBackgroundImage:[UIImage imageNamed:@"phones.png"] forState:UIControlStateNormal];
    

    Note:Remove front image before doing this.

提交回复
热议问题