美文网首页
iOS 获取Assets.xcassets中APPIcon中的图

iOS 获取Assets.xcassets中APPIcon中的图

作者: Jack张77 | 来源:发表于2017-06-27 14:20 被阅读0次

//在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中的图

      本文链接:https://www.haomeiwen.com/subject/wzkecxtx.html