问题:
NSBundle *bundle = [NSBundle mainBundle]; //取得mainBundle
NSString *pathOfPlist = [bundle pathForResource:@"PlistTest-Info" ofType:@"plist"]; //取得文件路径
解决方案:
单击项目-》Build phases-》找到CopyBundleResources 然后将PlistTest-Info.plist文件添加进来即可。
问题:
NSBundle *bundle = [NSBundle mainBundle]; //取得mainBundle
NSString *pathOfPlist = [bundle pathForResource:@"PlistTest-Info" ofType:@"plist"]; //取得文件路径
解决方案:
单击项目-》Build phases-》找到CopyBundleResources 然后将PlistTest-Info.plist文件添加进来即可。