Skip to content

Commit

Permalink
fix: skip invoking method didPopViewController when view embed inside…
Browse files Browse the repository at this point in the history
… another containerview or pageview
  • Loading branch information
lengocduy committed Dec 8, 2021
1 parent aa6c27a commit 18069b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ open class SwipeToPopTableViewController: UITableViewController, SwipeToPopContr
override open func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)

didPopViewController()
if view.superview == nil {
didPopViewController()
}
}

@objc
Expand Down
4 changes: 3 additions & 1 deletion DLSwipeToPopController/Impl/ SwipeToPopViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ open class SwipeToPopViewController: UIViewController, SwipeToPopControllable {
override open func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)

didPopViewController()
if view.superview == nil {
didPopViewController()
}
}

@objc
Expand Down

0 comments on commit 18069b8

Please sign in to comment.