开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜