You can do this if you call it with a delay. I used Threading.Timer to call PresentViewController a second after loading. As for the delegate, the UIViewController does not have this property. You will need to specify the type of controller that applies to the controller that you are loading. Then you can set the delegate. You might want to install WeakDelegate instead of a delegate if you want to use this (self).
public override void ViewDidLoad () { base.ViewDidLoad (); Timer tm = new Timer (new TimerCallback ( (state)=> { this.InvokeOnMainThread (new NSAction (()=> { UIStoryboard board = UIStoryboard.FromName ("MainStoryboard", null); UIViewController ctrl = (UIViewController)board.InstantiateViewController ("Number2VC"); ctrl.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve; this.PresentViewController (ctrl, true, null); })); }), null, 1000, Timeout.Infinite); }
holmes
source share