iOS6 sim与iOS6设备的UIButton setImage行为有何不同?

时间:2012-10-17 05:08:34

标签: uibutton ios6

我为我的UIButton设置了不同的图像,如下所示:

[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 个答案:

答案 0 :(得分:1)

哈哈! SIGH 当然,文件名错误命名。花了2天时间才弄明白:(