To do this you could use a Threading Timer to invoke code after 2
seconds.  But you can not call PushViewController directly in that
callback.  You must call InvokeOnMainThread.  This is similar to
Control.Invoke in SWF.

See the attached sample.

Hope this helps.

-bill

On Fri, May 11, 2012 at 6:15 PM, celticfrost <[email protected]> wrote:
> Hello, I am fairly new to mono touch although a veteran with c-sharp. I am
> wondering if anyone can help me with an issue.
>
> I have two controllers. RootController which is UINavigationController and a
> simple UIViewController. Basically after the application is launched and
> initial startup screen is shown, I want to spin up second controller. But
> application immediately shows second controller without displaying the root
> controller.
>
> So code looks like this in RootController.cs
> public override void ViewDidLoad ()
>   {
>        base.ViewDidLoad ();
>
>        Thread.Sleep (2000);
>
>        AuthenticatePasscodeController controller = new
> AuthenticatePasscodeController();
>        controller.Title = "Welcome - Login";
>        this.NavigationController.PushViewController (controller, true);
>   }
>
> I have a background image in rootcontroller.xib and I want it to be
> displayed for at least 2 seconds before taking user to the login screen
> through uinvaigationcontroller. How can I achieve this. If I don't push
> second controller on to root controller, then startup screen is displayed
> just fine but then I don't know how I can automatically spin up second
> controller.
>
> Apologies as I probably haven't phrased the question clearly.
>
> Thanks
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Initial-startup-screen-using-UINavigationController-tp4627699.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch

Attachment: AppDelegate.cs
Description: Binary data

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to