2012-10-17 42 views
0

我为我的UIButtons设置不同的图像,就像这样:UIButton setImage在iOS6 sim和iOS6设备上的行为不同?

[testButton setFrame:CGRectMake(0.0f, 416.0f, 64.0f, 64.0f)]; 
[testButton setImage:[UIImage imageNamed:@"test.png"] forState:UIControlStateNormal]; 

(各种图像有不同的尺寸,而我重新大小的UIButtons)

这将按预期在iPhone 6.0的模拟器,但在实际的iOS 6.0 iPhone中,图像不会显示在按钮上;这些按钮在不可见的情况下具有正确的尺寸位置。

我想要iPhone设备上的相同按钮行为;如何进行?

回答

1

哈哈! SIGH当然,文件名是错误的。花了2天时间来弄清楚:(