且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UIImage imageNamed 不适用于 ios 5.0

更新时间:2023-01-05 20:00:54

您通常不需要在名称中包含 @2x - iOS 应该自动选择正确的文件名(some.png 或 some@2x.png)取决于屏幕的比例.你有没有试过这个:

You normally don't need to include the @2x in the name - iOS should automatically pick the right filename (some.png or some@2x.png) depending on the scale of the screen. Have you tried this:

[image setImage:[UIImage imageNamed:@"some.png"]];

相反?