MobilesScreen.Show cannot determine parent view

In my iOS project I have a TabBar which shows a mobile screen Screen1. On that screen, I have a button which is supposed to show another mobile screen Screen2 with this code:
var ms as new Screen2

Tapping the button gives me a NilObjectException:

Unable to determine parent view. Try passing it in instead.

See the attached sample project. What is wrong with the code and how can I show another screen with a TabBar?

Thank you

Show is for Modal views. Try PushTo.

PushTo is API 1.0, no? It’s still available but it requires an iOSView and I don’t have that anymore in my app. I only have MobileScreens now.

Also, there is Show and ShowModal where the latter would be for showing modal screens. Show works in all other cases for me except when there is a TabBar involved.

Heh, you are correct. It’s a little early here.

Does this work?


Unfortunately not. I tried it this morning and debugged it step-by-step but the debugger would skip the “Opening” and “Activated” events and go right to the “Closing” event of the MobileScreen. Without stopping in the debugger, nothing happens on the screen, so you won’t even see the screen open and close.

I also tried other screens as parent screens but none seem to work.

I have just filed a bug report: <>

Tested the example project, this does work for me (in the simulator).

I do see you are using a TabBar. perhaps you may wanna try ms.ShowModal instead and passing in the parent screen ?

1 Like

CORRECTION: works. I tried to simplify the sample project. In my project there is an iOSMobileTable that’s causing the issue. Trying to show the MobileScreen from the SelectionChanged event does not work.