Enabling Fullscreen app in iOS 13+ Xamarin

Tram Ho

During the WWDC 2019 Apple recently introduced the card presentation as the new default presentation. On iOS 13 and above this will be the new behaviour for modal view controller when being presented. So if you want to insist on the fullscreen modal there are ways to archeive this. One is using renderers as i will demostrate below.

Solution

We can easily archeive this by implementing a custom navigation renderer for the app. Start by creating the renderer class NavigationPageRenderer. Here we will declare the ModalPresentationStyle (Respopnsible for specifying what type of layout the app will use).

Of course you can always apply UIModalPresentationStyle to each view per say but using renderer that extends NavigationRenderer will apply to all your screens. Happy Coding!!!

Share the news now

Source : Viblo