disables swipe back gesture on trackpads

This commit is contained in:
Stuart Breckenridge 2020-05-20 21:32:19 +08:00
parent c76a7aff40
commit 98c8ea6d9f
No known key found for this signature in database
GPG Key ID: 977FF9C8CE7AB207
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
}
// Disable swipe back on iPad Mice
if #available(iOS 13.4, *) {
guard let gesture = self.navigationController?.interactivePopGestureRecognizer as? UIPanGestureRecognizer else {
return
}
gesture.allowedScrollTypesMask = []
}
}
override func viewWillAppear(_ animated: Bool) {