2013-02-03 31 views
0

所以,我有以下圖象:的uImage未示出iphone 4/5版本

splash1.png(IPHONE 3) [email protected](IPHONE 4) [email protected](IPHONE 5 )

我想表明在iphone 3,4相應的圖像,5

我試圖做

UIImage * img = [UIImage imageNamed: @"splash1.png"]; 
self.splashimg.image = img; 
[self.splashimg setFrame: CGRectMake(0, 0, img.size.width, img.size.height)]; 

哪裏self.splashimg是鞋子的圖像的ImageView的IMG。

但這仍然顯示iPhone 3圖像,並沒有得到iPhone 4或5圖像。

我能做些什麼?

當我看看iphone 5的應用程序時,我看到了閃屏圖像,但它的iPhone 3版本。

回答

2

UIKit中沒有規定一般的[email protected]設備修飾符:它僅適用於Default.png

因此,這解釋了爲什麼你的應用程序不使用iPhone 5特定版本的圖像。

在任何情況下,它應該能夠使用@2x版本的文件,所以我建議檢查[email protected]是存在的,它不是損壞或格式錯誤等

你可以找到UIImage(通過一個類別)的擴展,以支持在此使用[email protected]設備修飾符:https://gist.github.com/3711077