How to Close iOS Popover?

I display a MobileContainer via .ShowPopover and have a button that performs a Method OK (updates a database). After the Method has finished I want to close the Popover window automatically.

On Desktop and Web I can .Close the Popover window, but this doesn’t work on iOS. I have tried to .Show the underlying MobileScreen, but this does nothing.

The user can drag down the Popover to make it disappear, but I would prefer to do it in code. Is there a way to solve this?

Is there really no way to close an iOS Popover in code? Must I add it as a request?

Hi @David_Cox

On iOS, the user is in control of dismissing modals, including Popovers; so it would be a bad idea to do it otherwise.

Maybe you can rethink the logic to update the current displayed Popover so it display as “Succeded” or whatever other message is appropriate. That way the user knows he can dismiss the popover, for example.

Also, on longer operations… the user may have closed the Popover already before the code had finished doing the job.

Being that said, you may open a FR.

Nevermind, I’ll add the FR for you: https://tracker.xojo.com/xojoinc/xojo/-/work_items/81911

Thank you for adding the FR.

I did add a MessageBox “…” after the operation (only a few seconds) and it never appears. I have also added an audible Beep when the operation finishes and a flat rounded rectangle to the top of the MobileContainer, so it is more obvious that the user needs to drag the MobileContainer down to close it.