iOS、swift技术交流!

如何从本地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];

上一篇 下一篇

猜你喜欢

热点阅读