Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Force iOS 13 to use Full Screen for Modal #7172

Merged
merged 1 commit into from
Aug 16, 2019
Merged

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented Aug 15, 2019

Description of Change

If running iOS13 then force the ModalPresentationStyle to Full Screen since XF can't handle swipe dismiss. Once we are on xCode 11 and have the necessary APIs then we can more easily react to swipe dismiss

Platforms Affected

  • iOS

Testing Procedure

Make sure Modal pages work on iOS as expected

PR Checklist

  • Has automated tests
  • Rebased on top of the target branch at time of PR
  • Changes adhere to coding standard

- Once we are on xCode 11 and can account for swipe dismiss we can make this better
@PureWeen PureWeen force-pushed the ios13_modal_fullscreen branch from f49bf17 to 1124b6a Compare August 15, 2019 21:24
@PureWeen PureWeen changed the base branch from 4.2.0 to 4.1.0 August 15, 2019 21:25
@samhouts samhouts added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Aug 16, 2019
@samhouts samhouts requested a review from hartez August 16, 2019 00:26
@PureWeen
Copy link
Contributor Author

Failing ios10 test unrelated

@samhouts
Copy link
Contributor

@PureWeen I don't see anything specific to iOS13 here.

if (elementConfiguration?.On<PlatformConfiguration.iOS>().ModalPresentationStyle() == PlatformConfiguration.iOSSpecific.UIModalPresentationStyle.FormSheet)
ModalPresentationStyle = UIKit.UIModalPresentationStyle.FormSheet;
var modalPresentationStyle = elementConfiguration?.On<PlatformConfiguration.iOS>()?.ModalPresentationStyle() ?? PlatformConfiguration.iOSSpecific.UIModalPresentationStyle.FullScreen;
ModalPresentationStyle = modalPresentationStyle.ToNativeModalPresentationStyle();
Copy link
Contributor Author

@PureWeen PureWeen Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samhouts the change here forces ModalPresentationStyle to explicitly be set to FullScreen by default where as before ModalPresentationStyle would only get set if you set it to FormSheet

on iOS12 ModalPresentationStyle is set to FullScreen by default but on iOS13 it's set to Automatic (Which is a new property on iOS13)

Automatic causes the ModalPresentationStyle to be FullScreen on ios12 but PageSheet on iOS13

By just setting the ModalPresentationStyle ourselves explicitly it will be FullScreen by default on iOS13 as well which makes it so users can't dismiss the Modal and break everything

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! That's the blurb I was hoping for. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. iOS 13 p/iOS 🍎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants