美文网首页iOS、swift技术交流!
如何从本地plist文件中加载数据

如何从本地plist文件中加载数据

作者: 光明程辉 | 来源:发表于2016-10-31 00:20 被阅读42次

从本地plist文件中加载数据


    //user code
    NSBundle *bundle = [NSBundle mainBundle];
    NSString *plistPath = [bundle pathForResource:@"event" ofType:@"plist"];
    //获取本地文件列表  NSArray
    events = [[NSArray alloc] initWithContentsOfFile:plistPath];

相关文章

网友评论

    本文标题:如何从本地plist文件中加载数据

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