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];

or

[[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)
 1KDgw4y5AUSUhmRVQSWiVS43YvrrxLmc8u

Sunday, 24-Sep-2017 09:17:49 +08 last updated: 2012-Oct


Web Development / Rich Internet Applications (RIA) Development

Programming Languages

Platforms

Database Development


   © 2003-2015 Neotitans Technologies Inc.