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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -