如何从本地plist文件中加载数据
2016-10-31 本文已影响42人
光明程辉
从本地plist文件中加载数据
//user code
NSBundle *bundle = [NSBundle mainBundle];
NSString *plistPath = [bundle pathForResource:@"event" ofType:@"plist"];
//获取本地文件列表 NSArray
events = [[NSArray alloc] initWithContentsOfFile:plistPath];