NSArray转NSDate【对象归档】

NSArray *arr1 = [[NSArray alloc]initWithObjects:@"0",@"5",nil];

NSData *data = [NSKeyedArchiver archivedDataWithRootObject:arr1];

NSArray *arr2 = [NSKeyedUnarchiver unarchiveObjectWithData:data];

NSLog(@"->%@",[arr1 objectAtIndex:1]);

NSLog(@"->%@",[arr2 objectAtIndex:1]);

你可能感兴趣的:(NSArray转NSDate【对象归档】)