I would like to detect if a method in objective c is called and executing on NSThread that is running on foreground or background.
NSThread
Thanks
You can check whether the current thread is the main one with:
+ (BOOL)[NSThread isMainThread]