iPhone开发--模拟器上能显示图片,而设备上不能显示图片
2012-03-21 17:56
330 查看
iPhone开发--模拟器上有图片,而设备上无图片这个问题之前遇到过,发现是程序中的图片和图片文件的大小写不一致造成的,后来改了大小写就好了。一直没找到官方的解释,在看Learn iPhone and iPad Cocos2D Game Development的时候,在书中的第56页找到了答案。记录下,共勉之。
警告:iOS设备上的文件名是区分大小写的!在模拟器上测试时并不区分大小写。
但是在iOS设备上实际测试时,程序就会因为大小写错误而崩溃。这个要求导致了很多让开发者头痛的问题,这也是另一个为什么要经常在设备上做实际测试的原因。为自己确立一个文件命名规则,并且坚持用下去。对我自己而言,我全部使用小写,词和词之间则用下划线分开。
WARNING:File names are case-sensitive on iOS devices! While you’re on the simulator, the filename’s
case doesn’t matter but when you switch over to testing on the device, it will most likelycrash if the file name is actually something like @“default.PNG”, as in the example.
This has caused many developers serious headaches and it’s another reason you should test onthe device often. It’s also a good idea to come up with a naming scheme for file names and stickto
it. Personally, I keep them in lowercase, using dashes where needed to separate words.
警告:iOS设备上的文件名是区分大小写的!在模拟器上测试时并不区分大小写。
但是在iOS设备上实际测试时,程序就会因为大小写错误而崩溃。这个要求导致了很多让开发者头痛的问题,这也是另一个为什么要经常在设备上做实际测试的原因。为自己确立一个文件命名规则,并且坚持用下去。对我自己而言,我全部使用小写,词和词之间则用下划线分开。
WARNING:File names are case-sensitive on iOS devices! While you’re on the simulator, the filename’s
case doesn’t matter but when you switch over to testing on the device, it will most likelycrash if the file name is actually something like @“default.PNG”, as in the example.
This has caused many developers serious headaches and it’s another reason you should test onthe device often. It’s also a good idea to come up with a naming scheme for file names and stickto
it. Personally, I keep them in lowercase, using dashes where needed to separate words.
相关文章推荐
- android开发模拟器显示图片大小与真实图片大小不一致问题
- iPhone开发之webview 拖动和显示本地图片的几组代码
- iphone真机无法显示图片,而模拟器可以正常显示
- iphone 开发图片显示圆角效果
- (iphone开发)从网络读取图片并显示
- tomcat容器 SSH项目开发 上传图片图片名为中文时不能显示图片问题解决
- 为什么刷机后开发环境的adb不能用了,总是显示设备“offline”?
- iphone真机无法显示图片,而模拟器可以正常显示
- 为什么刷机后开发环境的adb不能用了,总是显示设备“offline”?
- ireport+struts2集成开发总结一: 解决HTML图片背景不能显示的问题
- iphone 界面不能显示图片,文字问题的一般解决办法
- iphone 开发图片显示圆角效果
- iPhone开发之在图片上显示文字(Add text to UIImage)
- iPhone开发之将pdf以图片形式显示
- android开发模拟器显示图片大小与真实图片大小不一致问题
- iPhone开发基础之动画显示图片的实现
- iOS开发——关于拷贝的iOS工程在其他电脑上不能真机和模拟器运行,即只有MyMac设备,没有其他设备
- iphone真机无法显示图片,而模拟器可以正常显示
- 图片库不能以缩略图方式显示的原因
- 图片路径中含有中文在jsp下不能正常显示的问题