글
기본적으로 iOS 4.x 부터 홈버튼을 눌러서 프로그램을 종료할 경우, 백그라운드에서 동작되도록 지정됨.
Application의 백그라운드 동작시 메모리를 차지하고 있으므로 퍼포먼스에 영향을 줄 수 있음.
홈 버튼을 눌러서 실행되고 있던 Application을 종료(메모리 해제)할 수 있도록 하기 위해, 'AppDelegate.m'내의 메소드에 아래와 같이 'exit(0);' 한 줄 추가해 줌.
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
Use this method to release shared resources, save user data, invalidate timers,
and store enough application state information to restore your application to
its current state in case it is terminated later.
If your application supports background execution, called instead of
applicationWillTerminate: when the user quits.
*/
exit(0);
}
'아이폰' 카테고리의 다른 글
In App Purchase 개발 (0) | 2012.03.06 |
---|---|
Xcode webview set background color clearcolor(웹뷰 백그라운드 클리어 투명하게) (0) | 2012.02.28 |
잘 나가다가 Xcdoe4는 요런 메세지를 내면서 에러가 발생 (0) | 2012.02.28 |
xcode 홈 버튼 클릭 프로그램 종료시 메모리 해제 (0) | 2012.02.24 |
caanimation starting point 에서 잠시보이는현상 (0) | 2012.02.06 |
RECENT COMMENT