ios6 UIImageView - 加载-568h图像 [英] ios6 UIImageView - Loading -568h image
问题描述
我见过几篇关于UIImage在新iOS6中自动加载 filename-568.png 图像的帖子,但我似乎无法在UIImageView类中重新创建它。
I've seen a couple posts about the UIImage automatically loading the filename-568.png image in the new iOS6, but I can't seem to recreate it in the UIImageView class.
我正在使用故事板(不是我的应用程序,只需要做一些检查),而且我只是将图像视图缩放到适合的简单布局,没有代码在视图控制器中,我确定 filename.png 和 filename-568h.png 存在(以及 -568@2x.png 以防万一)但是当我在iOS6模拟器中加载它时。这适用于iOS 4和5,为视网膜加载@ 2x图像,但似乎在iOS6中不起作用。有任何想法吗?
I'm using the Storyboard (not my app, just having to do some checks), and I've a simple layout with just the Image View scaled to fit, no code in the view controller, and I've sure the filename.png and filename-568h.png exist (as well as -568@2x.png just in case) but when I load it up in the iOS6 simulator. This has been for iOS 4 and 5, loading the @2x image for retina, doesn't seem to work in iOS6 though. Any ideas?
图像碰巧被称为 Default.png ,因为它与启动图像相同,这可能是问题吗?
The image happens to be called Default.png since it is the same as the launch image, could this be the issue?
感谢提前任何帮助
推荐答案
iOS6不会自动加载-568h 和@ 2x图像一样。唯一的例外是默认屏幕,但除此之外,您必须自己手动设置568h图像。
iOS6 does NOT automatically load -568h as it does with the @2x images. The only exception is the default screen, but further than that you have to manually set you 568h image yourself.
我使用创建了一些模拟-568h图像加载行为的代码[UIImage imageNamed:@]
方法,但从IB我不知道的方式。如果您对此类解决方案感兴趣,请查看 http://angelolloqui.com/blog/20 -iPhone5-568h-image-loading
I created some code to mimic the loading behavior for -568h images when using the [UIImage imageNamed:@""]
method, but from the IB I do not know the way. If you are interested in such a solution, check it out at http://angelolloqui.com/blog/20-iPhone5-568h-image-loading
这篇关于ios6 UIImageView - 加载-568h图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!