In this video we'll review what we learned and what you can do to learn more about the specific topics.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5298-reproducing-popular-ios-controls/lessons/31
In this video we'll review what we learned and what you can do to learn more about the specific topics.
Wow! This course really is amazing. I have spent a lot of time on the courses building up to this course but I was having trouble putting it all together and I had some gaps in my comprehension which you really clarified!
Is it possible to keep user interaction enabled on the tableview while also having the swipe down to collapse feature? Can the pan gesture override the tableview’s gestures when the tableview is scrolled all the way to the top?
Hi! Yes that’s absolutely possible, but it gets tricky with how you handle touches. You want to make sure that the if the tableView
is at the top of the LocationsViewController
the touches will go through to the view
and not the tableView
when the user is pulling down, but if they’re pulling up you want to make sure that the touches go through to the tableView
.
A view can accept multiple gestures that are not mutually exclusive. There are UIGestureRecognizer
delegates that can help us distinguish between two gestures, but I think in this case it’s more useful to do a hit test combines with a scrolling direction.
A response on this topic might help better understand how touches are passed with presenting/presented views: Reproducing Popular iOS Controls - Part 29: | Ray Wenderlich Videos - #6 by leamars