Reputation: 9867
I'm trying to wait X amount of seconds in between actions.
When using [NSThread sleepForTimeInterval:3.0];
the app freezes for the set amount of time. How can I timeout without disrupting the main thread
?
Upvotes: 0
Views: 726
Reputation: 61228
You can't block the main runloop (which handles user input) and expect your app to remain responsive. Consider using an NSTimer.
Upvotes: 1