[MonoTouch] How to use "PresentModalViewController"

Adam Langley alangley at winscribe.com
Mon Oct 5 13:51:42 EDT 2009


Hi Kevin,

So are you saying that the call to "PresentModalViewController" is non- 
blocking?
Because your code looks very similar to mine... The difference being  
that mine doesn't work...
I don't have any call to dispose, or dismiss, so I don't _think_ it's  
getting destroyed... I'll have another tinker today

Btw ...  Nice to see the .co.nz represented here (c:

On 5/10/2009, at 11:00 PM, "Kevin Daly" <kevindaly at xtra.co.nz> wrote:

> I'm currently using a bit of code like this successfully:
>
> login = new LoginController();
> login.ModalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
> navigationController.PresentModalViewController(login,true);
> login.ButtonPressed+=(sender,args)=>
> {
>    RequestData();
>    navigationController.DismissModalViewControllerAnimated(true);
> }
>
>
> ...where the lines featuring navigationController (the instance  
> variable for
> my NavigationController) are the most relevant.
>
> When I first tried this I had the whole thing in a "using" block,  
> and spent
> almost a week trying to work out why nothing was happening - then I  
> realised
> that nothing was waiting for the ModalViewController to do anything  
> before
> proceeding, so it was effectively being dismissed and destroyed  
> immediately.
> I'd been fooled by my expectations from working with modal dialogs in
> Windows Forms.
>
> -----Original Message-----
> From: monotouch-bounces at lists.ximian.com
> [mailto:monotouch-bounces at lists.ximian.com] On Behalf Of Adam Langley
> Sent: Monday, 5 October 2009 9:41 p.m.
> To: monotouch at lists.ximian.com
> Subject: [MonoTouch] How to use "PresentModalViewController"
>
> I am trying to display a modal view, but I just can't get it to
> work... No exceptions, just nothing happens...
>
> Any possibility someone can make this a blogging priority? (c;
>
> Adam Langley
>
> Sent from my iPhone
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>


More information about the MonoTouch mailing list