Skip to content

How to manage safe area constraints on presented view controller during interactive presentation? #169

@bernikovich

Description

@bernikovich

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

        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)
                ])
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions