سؤال

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];  
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top