Is there any way to check whether or not the current thread is the main thread in Objective-C?
I want to do something like this.
- (void)someMethod
For Monotouch / Xamarin iOS you can perform the check in this way:
if (NSThread.Current.IsMainThread) { DoSomething(); } else { BeginInvokeOnMainThread(() => DoSomething()); }