当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - How to Archive two strings into NSData by using NSKeyedArchiver

问题描述:

I have NSMutableArray and a NSString.

How to archive these two in to a NSData by using NSKeyedArchiver in IOS6, Xcode4.6

网友答案:

Try this

// Convert it  to NSdata

    NSData *messageData1 = [NSKeyedArchiver archivedDataWithRootObject:message];
    NSData *messageData2 = [NSKeyedArchiver archivedDataWithRootObject:arr];  
分享给朋友:
您可能感兴趣的文章:
随机阅读: