After hiding navbar, touches aren't recognized where the navbar was - ios

I have a UIPageViewController which has a root view controller and a data view controller (the xcode template).
I have two tap gesture recognizers on the main view in the data view controller.
I have an image view embedded in a scroll view which is embedded in the main view.
A single tap hides the navbar and a double tap zooms the image. I am unable to use either gesture recognizer where the navbar was after it is hidden.
Is there a way to enable the gesture recognizers in this space when the navbar is hidden or did I just miss a step?
It's like the root view controller has blocked that area out; the gesture recognizers work perfectly everywhere else. I can post code if needed.

Related

How to push a View from bottom using swiftUI

I am drag Image using a drag Gesture. When the gestures action ends a another View push from bottom of the screen to top of the screen.
Already am try NavigationLink(), But NavigationLink doesn't support inside the gesture action.
How to handle this use case ?

Passing touches to Another Sibling UIView

As pictured below, I have a subview with a tap gesture attached to it.
When it's tapped, a popup view with its own view controller would be presented in the superview. At this time, the subview and the new popup view would be siblings inside of the superview. Popup view will have its own table view.
How do I pass the touch that is already down on the subview to the new popup view? Is this possible?
This behaviour could be seen on the new iOS context menus. The touch down that is used to envoke the popup menu could be use to select the choices on the popup menu.

Swift ios: drag view controller onto screen

Is there any way to drag a view controller onto the current view controller using Swift? I would like to drag from the bottom of the screen and have the new view controller follow the finger. When the finger releases, I want for the view to snap into place. The view controller that I plan to drag on needs to have a transparent background so that the previous view is still visible. I tried using a swipe gesture paired with an animation that brings in the view from the bottom, but the previous view turns black momentarily before the animation is complete. Also, it doesn't follow the finger's path. This is similar to what happens when you try drag from the bottom of the camera app. It brings up a page, following your finger, and darkening the background. I am doing this programmatically. Thanks.
To do this you will need to use a UIPageViewController and set its transition style to scroll and navigation to vertical. There are lot's of great tutorials on how to use a UIPageViewController so just look online.

Swipe gesture not working on UIPageViewController when button clicked

I have created a UIPageViewController which I present on the screen.
The page view consists of 4 views. On top of each view I have added a UIButton over the top of the whole view to detect when someone clicks on a view.
Here is the view in interface builder. The whole of each coloured view has a button covering it:
When the user swipes I want the page view controller to go from one screen to the next.
Problem
When I go to make a swipe gesture, if I touch a button then it picks up the tap gesture for that button. So if I continue to slide my finger across the screen the page gesture doesn't work.
Goal
Even when I tap on a UIButton, if I don't lift my finger but instead make a swipe gesture, then I would like the UIPageViewController to turn page.
How can I override the touch gesture and instead make the slide gesture count and thus turn the page of the UIPageViewController.
Help much appreciated.

How do I detect a pan gesture that starts outside my view?

I have a UIViewController with a UIPanGestureRecognizer on its UIView, inside a UINavigationController. I need to detect vertical pans, even if they start in the navigation controller's navigation bar. At the moment, my handler method only gets called if the pan starts inside my controller's view.
How do I detect a pan gesture that starts outside my view?

Resources