Skip to content

Periscope add safearea subview #136

@boboxiaodd

Description

@boboxiaodd

i use these code:

let bottomPadding = UIApplication.shared.keyWindow!.safeAreaInsets.bottom
        if  bottomPadding > 0 {
            print("\(actionController.collectionView.bounds.height) \(UIScreen.main.bounds.height) \(bottomPadding)")
            let bottomView = UIView(frame: CGRect(x: 0.0,
                                                  y: actionController.collectionView.bounds.height - bottomPadding - 5.0,
                                                  width: UIScreen.main.bounds.width,
                                                  height: bottomPadding + 5.0))
            bottomView.backgroundColor = .white
            actionController.collectionView.backgroundView?.addSubview(bottomView)
        }

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