【问题标题】:UIImageView loads file on simulator but not on device?UIImageView 在模拟器上加载文件但不在设备上?
【发布时间】:2009-11-15 01:16:00
【问题描述】:

这会将图像加载到模拟器上,但不会加载到设备上:

    UIImageView *splashImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"SplashPH.png"]];

[self.view addSubview:splashImage];

任何帮助表示赞赏 // :)

【问题讨论】:

    标签: iphone objective-c uiimageview


    【解决方案1】:

    未验证,但您可能想使用NSBundle pathForResource:ofType: 调用 - 请参阅How to fopen() on the iPhone?

    【讨论】:

    • 是的,做到了。路径问题。谢谢 // :)
    猜你喜欢
    • 2011-05-05
    • 1970-01-01
    • 2017-11-12
    • 2015-06-11
    • 2013-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多