cocoa - how to use NSRunLoop in objective-C? -


How to use NSRunLoop in Objective-C and how to use to change the value of some variables?

Thanks

We usually wait for a variable to change Will not use an NSRunLoop in production. Can use a callback.

However, in the unit test code we have the following:

  NSDate * twoSecondsFromNow = [NSDate dateWithTimeIntervalSinceNow: 2.0]; While the (! Callback Inquake & Error! Accelerator & amp; Runcount- & amp; amp; [[NSRunLoop currentRunLoop] RunMode: NSDefaultRunLoopMode before: DOSCFFMNM]] {twoSecondsFromNow = [NSDT DateEight TimeInternationalSync: 2.0];}  

The code waits until our callback is implemented, an error has occurred, or we have waited for a period of 2 seconds, we use it to test the delegates who callback

As I Scope said I would not do this in production code.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -