Sportica   Sportica

archivedDataWithRootObject NSUserDefaults

archivedDataWithRootObject  存储

BusinessCard *bc = [[BusinessCard alloc] init];   NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];   NSData *udObject = [NSKeyedArchiver archivedDataWithRootObject:bc];   [ud setObject:udObject forKey:@"myBusinessCard"];     udObject = nil;   udObject = [ud objectForKey:@"myBusinessCard"];   bc = [NSKeyedUnarchiver unarchiveObjectWithData:udObject] ;  
posted @ 2014-12-31 16:48  qingjoin  阅读(427)  评论(0编辑  收藏  举报
  Sportica