My Setup
I'm trying to replicate Google Now's card interface.
I have a UIView
which is a subview of (inside) a UIScrollView
. Both are controlled from the same UIViewController
. The UIView
has a UIPanGestureRecognizer
attached to it by the UIViewController
.
The UIScrollView
is used to scroll up and down. The UIPanGestureRecognizer
is used to swipe away the UIView
.
The Problem
I can't scroll when I'm touching the UIView
(the card)
The Question
How do I implement UIGestureRecognizerDelegate
to enable gestureRecognizer(_:shouldRecognizeSimultaneouslyWithGestureRecognizer:)
on the card so that it'll let the UIScrollView
scroll?
I've spent several hours trying to figure this out, and I would be incredibly thankful for help.