I've started a new thread like this:
[NSThread detachNewThreadSelector:@selector(doStuffInThread) toTarget:self withObject:nil];
The thread starts in this method, which performs some delayed stuff:
- (void)doStuffInThread {
[self performSelector:@selector(delayedMethod) withObject:nil afterDelay:2.0];
}
And then, I check in console if something happened. But nothing happens:
- (void)delayedMethod {
NSLog(@"it happened!");
}
I don't get an error. But the console stays empty. Is there something wrong with my threading code?