iphone - NSMutableDictionary -
how use nsmutable dictionary in class read , write data plist file in iphone....
any ideas?
as can find in in nsdictionary reference, class has method create nsdictionary file initwithcontentsoffile:(nsstring *)path
. can like:
nsstring *plistpath = [[nsbundle mainbundle] pathforresource:@"mydictionary" oftype:@"plist"]; nsdictionary *dict = [[nsdictionary alloc] initwithcontentsoffile:plistpath];
where mydictionary plist name (in case of plist inside resource bundle). can write plist on disk method:
[dict writetofile:filepath atomically: yes];
where filepath destination path.
Comments
Post a Comment