• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UINavigationController, hidesBarsWhenVerticallyCompact, and "unhandled taps" - how to "handle" them
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UINavigationController, hidesBarsWhenVerticallyCompact, and "unhandled taps" - how to "handle" them


  • Subject: Re: UINavigationController, hidesBarsWhenVerticallyCompact, and "unhandled taps" - how to "handle" them
  • From: David Duncan <email@hidden>
  • Date: Tue, 10 Nov 2015 09:41:58 -0800

> On Nov 10, 2015, at 7:46 AM, David Hoerl <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


References: 
 >UINavigationController, hidesBarsWhenVerticallyCompact, and "unhandled taps" - how to "handle" them (From: David Hoerl <email@hidden>)

  • Prev by Date: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Next by Date: Re: The joys of people using valueForKey to get objects out of a dictionary.
  • Previous by thread: UINavigationController, hidesBarsWhenVerticallyCompact, and "unhandled taps" - how to "handle" them
  • Next by thread: The joys of people using valueForKey to get objects out of a dictionary.
  • Index(es):
    • Date
    • Thread