Tag Archives: NSThread

Objective-C – Sleep Function

In Objective-C, you can use the sleepForTimeInterval class method of NSThread to sleep the program.

// Sleep the program for 10 second
[NSThread sleepForTimeInterval:10.0];

Done =)

Reference: NSThread Class Reference