iosuser-interfacegrand-central-dispatchibaction

Are IBActions fired on main queue?


I tried to search this out, but kinda stuck in this question. All guides about UI say, that all UI stuff should be on GCD main thread, but no one says about inner implementation of IBActions.

So, are IBActions fired on GCD main thread or not?


Solution

  • Yes, and you can test it by yourself using NSLog(@"is main thread? %d", [NSThread isMainThread]); You can also use the debugger and left view to know about what thread is been executed your code.