新しいスレッドを作ります。
var thread = new Thread(NewThreadMethod as ThreadStart); thread.Start();
新しいスレッドが呼び出されるメソッドを作ります。
[Export("NewThreadMethod")] void NewThreadMethod() { using(var pool = new NSAutoreleasePool()) { // Run code in new thread } }
メインスレッド以外からUIのコントロールを更新したりすることができません。新しいスレッドからUIを更新したい場合は、InvokeOnMainThreadを使用します。
InvokeOnMainThread( delegate { // Update UI Code (in Main thread) from the new thread. });
関連記事
Xamarin.iOSを使ってアプリ開発する際に逆引きとしてお使いください。