Вопрос по iphone – Задержка, но не отключение автоблокировки iPhone

5

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

[[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ]

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Rhythmic Fistman

Ваш Ответ

2   ответа
11

[UIApplication sharedApplication].idleTimerDisabledYES/NO

Error: User Rate Limit Exceeded Sean R
6

// disable idle timer for a fixed amount of time.
- (void) extendIdleTimerTimeout
{
    // cancel previous scheduled messages to turn idle timer back on
    [NSObject cancelPreviousPerformRequestsWithTarget:self
        selector:@selector(reenableIdleTimer)
        object:nil];
    // disable idle timer
    [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

    // re-enable the timer on after specified delay.
    [self performSelector:@selector(reenableIdleTimer) withObject:nil afterDelay: 60 * 2];

}

- (void) reenableIdleTimer
{
sharedApplication].idleTimerDisabled );
    [NSObject cancelPreviousPerformRequestsWithTarget:self
        selector:@selector(reenableIdleTimer)
        object:nil];
    // disable idle timer
    [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
}
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы