I have checked all the questions /answers related to this issue at least at stakoverflow .but without any success ,so far my issue is - I have created a new app - target IOS 7 and I have added my launchimage and my appIcon in the image.xcassets folder . when I launch my app on simulator the launchimae is showing perfectly without any issue but when I run the app on my iphone (iphone 5 , IOS 7.1) a black screen is showing instead of the launchimage any help or suggestions will be appriciated ? cheers,
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The problem is in your image.
You could open your image in Preview.app, then show the Inspector (⌘I
) and look at More Info tab. Wrong image will show you the following info:
and will result a black screen on the device (but will be ok in the Simulator). And the right one shood look like that:
I can't say how to fix wrong images in Photoshop. I found quite an ugly solution:
- open wrong png in PS;
- find and open correct png in another tab (make sure the canvas is of right size);
- select the whole image in the wrong png and copy it;
- paste the copied image into correct png file;
- perform
Save As...
command and replace your wrong image with the new one.
回答2:
Further to the answers above, the inspector actually tells you the size that it considers valid for use, so tweak it in whatever package before importing. I have many tools but for a quick-and-clean approach, good 'ol preview comes to the rescue if you take time to explore the editing tools