Are IBActions fired on main queue?

It is safe to assume that @IBActions are only called on the main thread by Apple's code under the hood. Apple's documentation:

Important: Use UIKit classes only from your app’s main thread or main dispatch queue, unless otherwise indicated. This restriction particularly applies to classes derived from UIResponder or that involve manipulating your app’s user interface in any way.

Note: it is entirely possible for your code to call an @IBAction's method on a background thread. That is why I make that distinction.

Note: If you are here because an error on an IBOutlet, Make your IBOutlets strong (not weak) to avoid accessing dereferenced IBOutlets in some cases.


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.