Modal View?

Is there any way in iOS to have a modal view? I’m porting some code over from a desktop app and I have a place where I create a modal dialog that allows the user to enter some information. Once the user enters it and the window is closed, the value is returned to the method that opened the dialog.

I don’t think there are dialogs in IOS from what I’ve seen, but I was simply going to push another view onto the screen instead. But Is there a way I can do this in a “modal” fashion - I want to present the first bit of code form executing until the user enters the info and exits the view. I could do it with an event for sure, but that would cause me to have to re-write a bunch of code that I’d rather not mess with!

Yes … but not in standard Xojo.

Jeremie Leroy has a huge collection of iOS extensions, available here: iOSDesignExtensions
All for free, thanks Jeremie !

1 Like

Also check out:

https://documentation.xojo.com/UserGuide:iOS_Dialog_Boxes#Modal_Views

[quote=489404:@Paul Lefebvre]Also check out:

https://documentation.xojo.com/UserGuide:iOS_Dialog_Boxes#Modal_Views[/quote]
Those declare are actually incomplete. Presenting a modal view with a Title and Toolbuttons requires creating a new NavigationController which is fixed in iOSDesignExtensions

I’d like to add that in iOS the code in your method does not stop when you show a modal view. It will continue running in the background. So you need to re-arrange your code if you want it to continue only after the modal view is closed.