Giter VIP home page Giter VIP logo

dismisspresentationcontrollerrepro's Introduction

Dismiss Presentation Controller Repro

Issue Status

This repro contains a reproduction of a maui issue where the UIAdaptivePresentationControllerDelegate does not work.

When using the ModalPresentationStyle in iOS, the page can be swiped closed by the user and there is no XF / Maui callback to handle this event. This issue was identified and fixed in MVVM Cross (XF) where their viewmodels werent closed, I have experienced the same issue with Prism (how I discovered the issue) and investigated the issue. It turns out Prism is unable to detect closed pages presented in this style and as a result causes issues with which page is active.

I have created a swift reproduction of the code & behavior I'd expect to see. It works as expected, when I swipe the popover pages away, the delegate fires and I have an event to handle:

Native sample which works

For the maui approach I have tried 2 ways of setting the delegate:

1 - Navigation Renderer

Using a navigation renderer, I try and set the delegate in ViewDidLoad, the code executes but the callback never invokes

2 - Page Renderer

Wondering if accessing the navigation page was an issue, since in the swift code I set these details on the UIViewController, I used a custom content page renderer (setting a custom UIViewController from this recommendation). I tried setting the delegate on the UIViewController PresentationController and using the parent NavigationController but the delegate once again does not fire.

For both examples you can see the debug statements that my code is executed and the delegates are set, but nothing actually seems to happen which is frustrating since these pages cause our apps to break catastriphically.

Here is the sample app running, you can see the debug statements from when the delegate gets set, but the dismiss action does not fire.

Maui issue being demonstrated

dismisspresentationcontrollerrepro's People

Contributors

axemasta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.