Web Hosting Philippines, Offshore Programming, Offshore SEO Philippines, Cheap Webhosting Manila Philippines
Home -> Resources -> iOS / Objective-C / Cocoa -> A non-blocking wait/sleep/delay

A non-blocking wait/sleep/delay in Cocoa

As per the technique revealed in the blog article here, the following one liner lets you do a non-blocking wait/sleep/delay in Cocoa. For a 10 second delay, you can do something like the following:

[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeInvervalSince:10];


[[NSRunLoop mainRunLoop] runUntilDate:[NSDate dateWithTimeInvervalSince:10];

if you are in main() and would like to be specific.

 Want to tip via bitcoin?

(address string below for double checking)

Friday, 17-Sep-2021 11:37:27 +08 last updated: 2012-Oct

Web Development / Rich Internet Applications (RIA) Development

Programming Languages


Database Development

   © 2003-2019 Neotitans Technologies Inc.