![](/img/trans.png)
[英]Can't install my iOS 7 app to the iPhone Retina (4-inch 64-bit) iOS simulator
[英]Images from Bundle doesn't show using iPad Retina 64-bit and real device
我使用UIPageviewcontroller(滚动类型)创建了一个照片滚动应用程序,该应用程序使用viewcontroller获取图像。 该应用程序可以在iPad和iPad视网膜模拟器中正常运行。 但是它没有在iPad视网膜64位和真实设备上显示任何图像。
我的代码是:
UIImageView *background =[[UIImageView alloc] initWithFrame:CGRectMake(0,0,screenHeightPortrait,screenWidthPortrait)];
NSString *imageFile = [[NSBundle mainBundle] pathForResource:self.mainImageLink ofType:nil];
background.image = [UIImage imageWithContentsOfFile:imageFile];
[self.view addSubview:background];
self.mainImageLink是一个NSArray元素。 例如“ image1.png”。
我试图在SO中找到解决方案并尝试:
image: /Users/my_user/Library/Application Support/iPhone Simulator/7.1-64/Applications/E16A2B0F-F766-41E4-A973-67CA79ED0F9C/myApp.app/images/image1.png
,我确保它是在副本包资源中,并使用Finder找到了图像 有什么我想念的吗? 非常感谢任何线索或提示。
非常感谢!
PS:我正在使用XCode 5.1.1和SDK iOS 7 + OSX 10.8.5 + MBP 2.5Ghz Core2Duo
其他一些用户对于64位设备也有同样的问题。 尽管正确实现了某些图像,但是在64位设备中,捆绑包中未显示某些图像。
您可以检查此SO Answer 。 它可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.