iOS 获取Assets.xcassets中APPIcon中的图片

//在Image Xcassets中appicon的名字已改成AppIcon~x~.png

NSDictionary *infoPlist = [[NSBundle mainBundle] infoDictionary];

NSString *icon = [[infoPlist valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject];

UIImage *shareImage= [UIImage imageNamed:icon];

你可能感兴趣的:(iOS 获取Assets.xcassets中APPIcon中的图片)