简体   繁体   English

IOS新手,手机上的应用程序与模拟器不同

[英]New to IOS, app on my phone is different then simulator

I got my IOS developers today and just did all the Provision Profiles and I just ran my app on my phone for the first time. 我今天得到了我的IOS开发人员,刚刚完成了所有的配置文件,我第一次在手机上运行了我的应用程序。 For some reason one of the backgrounds in my app works on the simulator but doesn't show up on the iPhone. 出于某种原因,我的应用程序中的一个背景在模拟器上工作,但没有出现在iPhone上。 Can anyone explain this? 有谁能解释一下?

Edit: 编辑:

The Background is a UIImageView set to the index of 0. When the app is launched it starts with the background that works and when a button is pressed it changes to a different UIImage that doessnt work on my phone. Background是一个设置为索引为0的UIImageView。当应用程序启动时,它以可用的背景开始,当按下按钮时,它会变为另一个在我的手机上工作的UIImage。

You should double-check your resources. 你应该仔细检查你的资源。 You should note that while the simulator appears to be case-insensitive, the device is case-sensitive! 您应该注意,虽然模拟器似乎不区分大小写,但设备区分大小写! If your image file is called "myAwesomeImage.png" and your code says… 如果您的图像文件名为“myAwesomeImage.png”并且您的代码显示...

UIImage *image = [UIImage imageNamed:@"myawesomeimage.png"];

…it may work on the simulator, but it won't on the device. ...它可能在模拟器上工作,但它不会在设备上。

It sounds like a problem with the way your resources are copied. 这听起来像是资源复制方式的问题。 Make sure all the necessary image files are included in both the device and simulator targets. 确保所有必需的图像文件都包含在设备和模拟器目标中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM