0

我迷上了 SpringBoard 方法,我想等待某个事件发生然后继续我的代码,但无论我尝试什么 - 我认为它会暂停主线程,然后所有线程都停止。我的代码是:

+(void) startc {
    while([currentNumber isEqual:@""])
    {
        NSLog(@"waiting until currentNumber is not empty %@", currentNumber);
    }
}

id replaced_SBCallAlert_initWithCall_(id self, SEL _cmd, CTCallRef call) {  // Note the 
        NSLog(@"calling replaced");
            [cdBackground startc];
        original_SBCallAlert_initWithCall_(sbc, scc, cls); 
            return NULL;
    }

currentNumber 在另一个线程中更新,但是这段代码阻止了它。

4

1 回答 1

1
于 2011-06-22T12:06:45.660 回答