> On Nov 10, 2015, at 7:46 AM, David Hoerl <dho...@mac.com> wrote:
> 
> Title pretty much says it - I have a UICollectionView, 
> hidesBarsWhenVerticallyCompact = true. Rotate to hide the nav bar works fine.
> 
> I can press and drag to scroll, no change. But if I tap on a cell, even if my 
> code "handles the tap" by implementing the collection view delegate, the nav 
> bar shows again!
> 
> Is there some magic that would convince the navigation controller that I have 
> in fact handled the tap?


Part of the problem is in how gestures vs responder-chain touch is handled. The 
hide gesture has cancelsTouchesInView=NO, which is why both are handling it. I 
think you can defeat the gesture by giving it a failure requirement (I think a 
simple tap recognizer with cancelsTouchesInView=NO might do it) that you add to 
the collection view. This should allow non-collection view taps to still show 
the bars, while collection view taps are ignored. Similarly you could create 
your own gesture recognizer with your own custom recognition semantics to do 
something similar.
--
David Duncan


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to