Greetings to everyone!
I have :
- A view - is main view of UIViewController
- B view - is UIView and subview of A view (A_view.addsubview(B_view))
- C view - is UICollectionView and subview of A view ...
What is problem?
I can`t catch touch, swipe events in parent view controller.
What do I mean?
When I try to catch touch event using :
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {...
in A View controller I can see such results.
I try to catch swipes by UIScreenEdgePanGestureRecognizer added to A_view
Touch on A View -> touchesBegan(...) -> works
Swipe on A View -> UIScreenEdgePanGestureRecognizer -> works
Touch on B View -> touchesBegan(...) -> works
Swipe on B View -> UIScreenEdgePanGestureRecognizer -> works
Touch on C View -> touchesBegan(...) -> doesn't work
Swipe on C View -> UIScreenEdgePanGestureRecognizer -> doesn't work
I noticed that I can catch touch events in C view controller.
Question
Is there possibility to catch swipe/touch events produced on C view ( UICollectionView) in A view controller (UIViewController).
My Goal
My goal is to make SideBar view, and when I try to catch swipe on the edge of screen over C view (UICollectionView) it just scrolling inside, but I want to open SideBar when finger start