The parent VC needs to dismiss the modal. The modal can't dismiss itself Sent from my iPad
On Apr 25, 2012, at 9:03 AM, Chris House <[email protected]> wrote: I have an app with a single main viewcontroller. When the app loads, I would like this main viewcontroller to display a modal view that the user would use to login. Upon successfully logging in, the modal would be dismissed and the main view would be visible. I’ve added the following override for the main viewcontroller’s ViewDidAppear method: public override void ViewDidAppear(bool animated) { LoginViewController loginController = new LoginViewController(); this.PresentModalViewController(loginController, true); } This part works great, the login view is displayed as expected. On the login view controller, I have an event handler for a button’s TouchUpInside event. This handler calls a method that performs authentication using the credentials entered by the user. If authentication is successful, I have the following code to dismiss the modal: this.DismissModalViewControllerAnimated(true); The previous line of code executes without any exceptions, however the modal is never dismissed. Can anyone point me in the right direction here as to how I get the modal to be dismissed? Thanks! Chris _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
