Save Objects to plist file
I need to save a CGDDisplayModeRef to a plist file开发者_如何学Go but none of the available types are good for storing CGDisplayModeRef. Is there a way around this?
You can implement an object wrapper / container for this class and implement NSCoding for an object by writing a code for coding / decoding an valuable params for CGDDisplayModeRef. Afterward use NSKeyedArchiver / NSKeyedUnarchiver for saving / loading of your wrapper object with CGDisplayModeRef inside of it.
Saved the height, width & pixel encoding to a plist file & then used the myBestMode method found in Quartz Display Services to find a mode for the saved attributes.
精彩评论