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

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.