Skip to content

Method to remove PullUpController? #15

Closed
@tomaculum

Description

@tomaculum

Hi,

Is there a method like the open func addPullUpController(_ pullUpController: PullUpController) to remove the PullUpController from the main view?

I did found the following three lines to remove a subview and added them to the extension UIViewController in your PullUpController.swift file:

open func removePullUpController(_ pullUpController: PullUpController) {
    pullUpController.pullUpControllerMoveToVisiblePoint(0, completion:  { () in
        pullUpController.willMove(toParentViewController: nil)
        pullUpController.view.removeFromSuperview()
        pullUpController.removeFromParentViewController()
    })
}

Does this make sense? Could there be a conflict with the previously added gesture recognizer or constraints?

Best,
Tom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions