ListViewController-> DetailsViewController, the navigationController of the DetailsViewController support interactivePopGestureRecognizer feature, that can swipe right and back to ListViewContorller, it is fine,
just the DetailsViewController contains some UICollectionView, it does not response the swipe gesture, it is meaning if user touch the CollectionView swipe,drag the view from left to right, the navigationController not got the action at all, how to solve this problem ?
I just try this way:
[collectionView addGestureRecognizer: self.navigationController.interactivePopGestureRecognizer];
but it not works .
so then I create new 'Swipe Gesture Recognaizer' and bind to collectionView, also link to the selector action as bellow:
I add code in the details view:
-(IBAction)swipeBack:(id)sender
{
[self.navigationController popToRootViewControllerAnimated:true];
}
then, if user touch the collectionView, then it can back to list view controller, but it not is good enough, because it not works the same to 'interactivePopGestureRecognizer',
anyone know other best solution for this purpose ? thanks for your time.