开发者

read plist iphone sdk

I am trying to read a plist file using this -

N开发者_C百科SData *data = [NSData dataWithContentsOfFile:SettingsFilePath];

NSPropertyListFormat format;
NSArray *array = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:NSPropertyListImmutable format:&format errorDescription:nil];

but its not working.. is there any other way of doing this?


try with this way -

  NSArray *arr= [[NSArray alloc] initWithContentsOfFile:plistPath];


Try + (id)arrayWithContentsOfFile:(NSString *)aPath to load it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜