Easy way to excecute method after a given delay?
问题 Is there a easy way to perform a method after a given delay like in iOS out of the box? On iPhone I would do this: [self performSelector:@selector(connectSensor) withObject:nil afterDelay:2.5]; It will then schedule the method connectSensor on the main thread (UI thread) to be executed after 2,5 seconds. And because it is automatically scheduled on the main thread, you don't have to worry about cross thread issues. (There is also a performSelectorOnBackground version) So how would I do this