views:

26

answers:

1

Hi All,

i create a view based application , in this project i want read data from .plist file.

how it is possible,

Pleas help me ?

A: 

If you are sure the .plist file is a dictionary at root level,

return [NSDictionary dictionaryWithContentsOfFile:@"path/to/your.plist"];

otherwise,

NSData* plist_data = [NSData dataWithContentsOfFile:@"path/to/your.plist"];
return [NSPropertyListSerialization propertyListFromData:plist_data mutabilityOption:NSPropertyListImmutable format:NULL errorDescription:NULL];
KennyTM