开发者

read plist iphone sdk

开发者 https://www.devze.com 2023-03-09 16:46 出处:网络
I am trying to read a plist file using this - N开发者_C百科SData *data = [NSData dataWithContentsOfFile:SettingsFilePath];

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

精彩评论

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