PanModal: Not working with iOS 17.1+
Description
Describe your issue here.
What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
- I’ve read and agree to the Code of Conduct.
- I’ve searched for any related issues and avoided creating a duplicate issue.
Bug Report
Modal controller don’t present on iOS 17.1 and upper.
Reproducible in:
PanModal version: 1.2.7
iOS version: 17.2 beta
Steps to reproduce:
- Create controller for present by PanModal
- Present that controller by “presentPanModal” func
- Look at dark screen without your controller.
Expected result:
Modal controller under dark screen.
Actual result:
Dark screen without modal controller.
Attachments:
About this issue
- Original URL
- State: open
- Created 8 months ago
- Comments: 18
Commits related to this issue
- feat: https://github.com/slackhq/PanModal/issues/202 — committed to yanxiaobing/PanModal by yanxiaobing 8 months ago
- https://github.com/slackhq/PanModal/issues/202 半屏偶尔显示不出来问题fix — committed to holla-world/PanModal by deleted user 6 months ago
From the tests I have performed the problem appears in the
addRoundedCornersfunction of thePanModalPresentationControllerclass.Because when creating the
panContainerViewobject,containerViewis nilTo solve the problem, we add in line
179, to the frame calculation if it is zeroI hope it will be of help
If you embedded viewController inside UINavigationController, try below code:
Hope this help.
@Pato-Salazar
https://github.com/slackhq/PanModal/pull/204
Yeah, I can also reproduce this on iOS 17.1. The strange thing was that some ViewControllers were showing up and some were not. Then I realized that the view controller won’t show up on
presentPanModalif you add subviews / set up auto layout constraints ininit(), so in my particular case the fix was just to moveaddSubview,snp.makeConstraintscode tooverride func viewDidLoad().No need to search new library 😃