In mine, UINavigationControllerI added custom back buttons with a side effect that it is no longer possible to scroll left and right to pull out the view controller and go back.
So, I have implemented interactivePopGestureRecognizerin my custom class UINavigationController:
class UINavigationControllerExtended: UINavigationController, UIGestureRecognizerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
if self.respondsToSelector(Selector("interactivePopGestureRecognizer")) {
self.interactivePopGestureRecognizer?.delegate = self
}
}
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
}
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailByGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return gestureRecognizer.isKindOfClass(UIScreenEdgePanGestureRecognizer)
}
}
, , (RVC), UICollectionViewController, . , , . UICollectionViewCell, (DVC) RVC. DVC .
RVC , -, DVC . , DVC , . RVC .
, , DVC , .
, ?