멀티태스킹을 사용하지 않고 바로 종료하기

Supporting Files - Info.plist 에 "Application does not run in background" 를 YES 로 설정. 없으면 추가.


멀티태스킹 지원 체크하기

- (bool)multitaskingAvailable
{
    UIDevice *device = [UIDevice currentDevice];
    if ([device respondsToSelector:@selector(isMultitaskingSupported)])
        return [device getMultitaskingSupported];
    return NO;
}


UIBackgroundModes

백그라운드 실행형태.
Supporting Files - Info.plist 에 "Required background modes" 키와 값을 추가한다.

1. audio : 백그라운드시 멈추지 않는다.
2. location : OS 에 의해 주기적으로 깨어난다.
   applicationDidEnterBackground 에서 startMonitoringSignificantLocationChanges 를 호출하여 정확도를 낮춰 배터리 소모를 줄이도록 한다.
3. voip : OS 가 네트워크 소켓을 감시하다가 전화가 걸려오면 깨운다.


'Mobile > iOS' 카테고리의 다른 글

[iOS] iOS Application Life-cycle  (0) 2012.02.17
[iOS] boolean type  (0) 2012.02.17
[iOS] Gesture Recognizer  (0) 2012.02.16
[iOS] Touches  (0) 2012.02.16
[iOS] 회전  (0) 2012.02.08

+ Recent posts