-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with iOS 17.1+ #202
Comments
What should we do? |
Start to search new library I guess |
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 No need to search new library 😃 |
If you embedded viewController inside UINavigationController, try below code: let modalVC = SheetViewController()
let navigationController = UINavigationController()
// This isn't work
// let navigationController = UINavigationController(rootViewController: modalVC)
navigationController.setViewControllers([modalVC], animated: false)
presentPanModal(navigationController) Hope this help. |
Same issue here. The interesting part is that if click on the hierarchy button I see the controller I am trying to present. It is part of the hierarchy. |
遇到了同样的问题 |
Can confirm, that workaround provided by @yavl works. Moving all layout configuration from constructor to viewDidLoad (or other lifecycle methods) fixes the issue. |
Does not work for me. Maybe because I have a collectionView in the modal that is being presented??.. Is this library abandoned?... |
if you are presenting UICollectionViewController, try making minimal reproducible example with UIViewController + UICollectionView on it instead and see if that helps. |
From the tests I have performed the problem appears in the func addRoundedCorners(to view: UIView) {
let radius = presentable?.cornerRadius ?? 0
let path = UIBezierPath(roundedRect: view.bounds, // Bounds value is .zero
byRoundingCorners: [.topLeft, .topRight],
cornerRadii: CGSize(width: radius, height: radius))
// Draw around the drag indicator view, if displayed
if presentable?.showDragIndicator == true {
let indicatorLeftEdgeXPos = view.bounds.width/2.0 - Constants.dragIndicatorSize.width/2.0
drawAroundDragIndicator(currentPath: path, indicatorLeftEdgeXPos: indicatorLeftEdgeXPos)
}
// Set path as a mask to display optional drag indicator view & rounded corners
let mask = CAShapeLayer()
mask.path = path.cgPath
view.layer.mask = mask
//Improve performance by rasterizing the layer
view.layer.shouldRasterize = true
view.layer.rasterizationScale = UIScreen.main.scale
} Because when creating the private lazy var panContainerView: PanContainerView = {
let frame = containerView?.frame ?? .zero // ContainerView is nill
return PanContainerView(presentedView: presentedViewController.view, frame: frame)
}() To solve the problem, we add in line override public func presentationTransitionWillBegin() {
guard let containerView = containerView
else { return }
// Fix bug issue
if self.panContainerView.frame == .zero {
self.adjustPresentedViewFrame()
}
... I hope it will be of help |
@oscarcv this actually works for me as well. Nicely done. Are you cool if I create a PR with your solution? |
@oscarcv I tagged the library owners.. if we get lucky they might merge this...thanks again |
Got same issue, on iOS 17.1.1, 14 pro max In our case it showing up for first time and after that only dark screen, if we try to open modal multiple times |
for iPad it has an issue with your fix @oscarcv, any idea? |
fix problem with iOS 17.1 lazy var workingVC = WorkingTimeViewController() /// need create class type UINavigationController |
半屏偶尔显示不出来问题fix
Faced the same issue but with using PanModal for UIPageViewController. |
Description
Describe your issue here.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)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:
Expected result:
Modal controller under dark screen.
Actual result:
Dark screen without modal controller.
Attachments:
The text was updated successfully, but these errors were encountered: