开发者

How to save NSManagedObject in userdefaults

开发者 https://www.devze.com 2023-01-26 11:32 出处:网络
Hi all, How can I save an NSManag开发者_如何学CedObject in userDefault. Any help will be greatly appreciated, Thanks in advance.You can get the ObjectID, transform into NSURL using the URIRepresent

Hi all,

How can I save an NSManag开发者_如何学CedObject in userDefault.

Any help will be greatly appreciated, Thanks in advance.


You can get the ObjectID, transform into NSURL using the URIRepresentation, and then archive it in a NSData using the NSKeyedArchiver. Now you can save it in the userdefaults.

0

精彩评论

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