We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello guys. I have faced with an issue related to safe area during interactive presentation. Does someone knows how to fix it?
I have added in PresentrExample.MainTableViewController -> lazy var alertViewController following codeL
lazy var alertViewController
if #available(iOS 11.0, *) { let custom = UIView() custom.backgroundColor = UIColor.red.withAlphaComponent(0.5) custom.translatesAutoresizingMaskIntoConstraints = false alertController.view.addSubview(custom) NSLayoutConstraint.activate([ custom.leadingAnchor.constraint(equalTo: alertController.view.leadingAnchor), custom.trailingAnchor.constraint(equalTo: alertController.view.trailingAnchor), custom.bottomAnchor.constraint(equalTo: alertController.view.safeAreaLayoutGuide.bottomAnchor), custom.heightAnchor.constraint(equalToConstant: 50) ]) }
The text was updated successfully, but these errors were encountered:
First screenshot shows normal behavior. Second one with issue during interactive dismissal.
Sorry, something went wrong.
SafeArea guide changes without animation. So user can see blink when my red view changes its place.
Hi, try to replace calculateCenterPoint func in ModalCenterPosition file on:
func calculateCenterPoint(_ containerFrame: CGRect) -> CGPoint? { var bottom: CGFloat = 0 var top: CGFloat = 0 if #available(iOS 11.0, *), let keyWindow = UIApplication.shared.keyWindow { if keyWindow.safeAreaInsets.bottom > 0 && keyWindow.safeAreaInsets.top > 0 { top = keyWindow.safeAreaInsets.top bottom = keyWindow.safeAreaInsets.bottom } } switch self { case .center: return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), y: containerFrame.origin.y + (containerFrame.height / 2)) case .topCenter: return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), y: containerFrame.origin.y + (containerFrame.height * (1 / 4) - 1) + top) case .bottomCenter: return CGPoint(x: containerFrame.origin.x + (containerFrame.width / 2), y: containerFrame.origin.y + (containerFrame.height * (3 / 4)) - bottom) case .custom(let point): return point case .customOrigin(_): return nil } }
No branches or pull requests
Hello guys.
I have faced with an issue related to safe area during interactive presentation. Does someone knows how to fix it?
I have added in PresentrExample.MainTableViewController ->
lazy var alertViewController
following codeLThe text was updated successfully, but these errors were encountered: