Re: 'barHideOnSwipeGestureRecognizer' works with two UIScrollViews but not with two others
Re: 'barHideOnSwipeGestureRecognizer' works with two UIScrollViews but not with two others
- Subject: Re: 'barHideOnSwipeGestureRecognizer' works with two UIScrollViews but not with two others
- From: David Duncan <email@hidden>
- Date: Fri, 06 Nov 2015 10:17:45 -0800
> On Nov 6, 2015, at 8:04 AM, David Hoerl <email@hidden> wrote:
>
> I know this is an esoteric question.
>
> I enabled 'hidesBarsOnSwipe' in my MMSpreadSheet view controller. This UIView subclass has 4 UICollectionViews in it - two up top and two below.
>
> The top left 'corner' controller does not scroll, and the top right does not scroll vertically. Out of the box up/down swipes work perfectly with the barHideOnSwipeGestureRecognizer to get the Navigation Bar to hide/show.
>
> But try as I might, I cannot get the bottom two views to provide the same functionality, both of which scroll vertically. I tried adding a new UIPanGestureRecognizer to the collectionView that returns 'true' when sent the delegate message 'shouldRecognizeSimultaneouslyWithGestureRecognizer'. Interesting that I actually get asked if this new recognizer should work with both the 'barHideOnSwipeGestureRecognizer' and the CollectionView's panGestureRecognizer (I return 'true' for both).
>
> I also configured this new recognizer to exactly match the configuration of the UICollectionViews panGestureRecognizer.
>
> Just odd that the barHideOnSwipeGestureRecognizer has added itself to the collection view, but refuses to handle the swipe.
The scroll (collection) view needs to abut or underlap the navigation bar for the gesture to recognize, which is why your bottom collection views don’t work. There isn’t a way to override this behavior, so I don’t really have any good answers for how you might obtain it.
>
> Any suggestions?
>
> - David
> _______________________________________________
>
> 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
--
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