The correct way to implement AGSPopupsViewController wantsToShow/wantsToHide?

556
3
06-21-2019 12:03 PM
SteveMiller4
New Contributor II

In the thread

Popup / Popup container changing size 

you mention that the solution to their issue is to use the wantsToShow/wantsToHide delegate method. I'm having a similar problem to what is described, but I can't find any example of how to use wantsToShow/wantsToHide. How do I let the AGSPopupsViewController know to save the selected value?

0 Kudos
3 Replies
SteveMiller4
New Contributor II

Also, the problem I'm having is that I have an AGSPopupsViewController in the master panel of a UISplitViewController. This works fine on iPad where edit windows have room to be presented as modals, but on iPhone, the master view is the one showing, and the AGSPopupsViewController then tries to present a modal as well in order to edit a field, and that causes the master panel to hide. I'm guessing that the solution is to implement wantsToShow/wantsToHide on the delegate, but let me know if there is a better way.

0 Kudos
Nicholas-Furness
Esri Regular Contributor

I haven't really dug into this, but might the modalPresenter property on the AGSPopupsViewController help out here?

0 Kudos
SteveMiller4
New Contributor II

This did it, thanks! (Though some sample code for wantsToShow would still be helpful in general)