4,545,849 th visitor since 2017.2.1 ( Today : 2241 )
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



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog