How do I use the writeToFile method on an NSMutableDictionary?

Steve picture Steve · Sep 20, 2011 · Viewed 22.3k times · Source

I would like to use a method (writeToFile) only available for NSDictionary to a NSMutableDictionary object. So, how do I convert this NSMutableDictionary object to NSDictionary?

Answer

Daryl Teo picture Daryl Teo · Sep 20, 2011

NSMutableDictionary inherits from NSDictionary. So, writeToFile should be available to both classes.