Simple question. How do I access the main thread from a background thread in Xamarin.Mac? In Xamarin.iOS I use
InvokeOnMainThread(() => { //do something });
and while InvokeOnMainThread is a method of NSObject, it doesn't appear to exist in Xamarin.Mac.
I'm using Task.Run to create the background thread.
InvokeOnMainThread does exist in Xamarin.Mac, double check the object you are trying to call it on.
NSApplication.SharedApplication is a global NSObject you can fetch to invoke/begininvoke on
Answers
InvokeOnMainThread does exist in Xamarin.Mac, double check the object you are trying to call it on.
NSApplication.SharedApplication is a global NSObject you can fetch to invoke/begininvoke on