【问题标题】:UIButton setImage behavior different in iOS6 sim vs iOS6 device?iOS6 sim与iOS6设备中的UIButton setImage行为不同?
【发布时间】:2012-10-17 05:08:34
【问题描述】:

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

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

(各种图像具有不同的尺寸,我将 UIButton 调整为不同的尺寸)

这在 iPhone 6.0 模拟器中按预期工作,但图像不会显示在实际 iOS 6.0 iPhone 的按钮上;按钮不可见,尺寸位置正确。

我希望在 iPhone 设备上具有相同的按钮行为;如何进行?

【问题讨论】:

    标签: uibutton ios6


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-21
      • 2013-06-15
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多