Is there a way to get the current application icon in a cocoa-touch app? Thank you.
I based my answer completely on moosgummi's, but returning a UIImage
instead.
UIImage *appIcon = [UIImage imageNamed: [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIconFiles"] objectAtIndex:0]];
The UIImage
automatically selects the suitable version (normal, @2x
, ~ipad
, ~ipad@2x
or any future suffix). (BTW, don't you just hate this stupid scheme for identifying versions of images? It was just getting out of hand. Thank god for Asset Catalogues!)