Paul Knopf
Paul Knopf

Reputation: 9776

MonoTouch, how to tell if I am on UI thread

The title says it all.

I have a generic function that is used to run actions on the UI thread. I want to simple invoke the action if I am already on the UI thread.

Is there a way to do this with MonoTouch?

Upvotes: 2

Views: 480

Answers (1)

jonathanpeppers
jonathanpeppers

Reputation: 26495

Yes it is NSThread.IsMain.

See this post.

Upvotes: 3

Related Questions