我有一个 NSThread,我想在一定时间后超时。
[NSThread detachNewThreadSelector:@selector(someFuntion) toTarget:self withObject:nil];
- (void) someFunction {
//Some calculation that might take a long time.
//if it takes more then 10 seconds i want it to end and display a error message
}
您可以提供的任何帮助将不胜感激。
谢谢,
Zen_silence