-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Force iOS 13 to use Full Screen for Modal #7172
Conversation
- Once we are on xCode 11 and can account for swipe dismiss we can make this better
f49bf17
to
1124b6a
Compare
Failing ios10 test unrelated |
@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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
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
Testing Procedure
Make sure Modal pages work on iOS as expected
PR Checklist