Programming
No. | 591 |
Name. | 로꼬다 |
Subject. | 프로그램 종료시 이전 데이터 저장했다가 부르기 |
Main Cate. | iOS |
Sub Cate. | iOS |
Date. | 2009-04-09 14:20 |
Hit. | 3425 (211.36.27.28) |
File. | |
1. 상태 저장은 AppDelegate 부분에서 - (void)applicationWillTerminate:(UIApplication *)application { [viewController saveData]; // update the defaults on quit } 2. 데이터 복원은 loadView,viewDidLoad 등등에서 3. 데이터 저장은 NSUserDefaults를 사용한다 [[NSUserDefaults standardUserDefaults] setObject:colors forKey:@"colors"]; 4. 데이터 복원도 NSUserDefaults를 사용한다 colors = [[NSUserDefaults standardUserDefaults] objectForKey:@"colors"]; [바로가기 링크] : http://coolx.net/cboard/develop/591 |
|
|
|
[Modify] [Delete] | [Reply] [List] |