I am using Assets Catalog, and adding app icon of various size to the assets is okay.
But when I tried to get the UIImage programmatically, it returned nil.
UIImage *appIcon = [UIImage imageNamed"AppIcon"];
The app icon is named AppIcon
(the default), and the actual files are app-icon-256.png
etc.
I also noticed that unlike normal images, app icons are in an "App Icon" set, in the directory AppIcon.appiconset
. Normal images are in the directory someimage.imageset
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…