标签:
1.在Xcode5下,获取程序名字(app name)的方法为:
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *bundleName = [infoDictionary objectForKey:@"CFBundleName"];
或者
NSString *proName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
2.在Xcode6下,获取程序名字(app name)的方法为:
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *bundleName = [infoDictionary objectForKey:@"CFBundleName"];
或者
NSString *proName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
标签:
原文地址:http://www.cnblogs.com/yhj1787354782/p/4996839.html