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.
Related
when I'm unwinding a segue by clicking on a button with a cross image which is 1/4th inside a UIView and 3/4th outside the UIView now when I press on button the part which is inside the UIView then unwind segue works but if I click outside of UIView then it does not works.
As you can see from above image if I click inside the blue line then other view controller opens and If I click outside blue line of cross button the unwinding of segue does't work, why?
You can View the Video
<img src="https://i.imgflip.com/24bh0k.gif" title="made at imgflip.com"/>
The cross button seems to be inside the card view rather than superview. Put the button inside superview, over the card view but outside the card view.
Do something like this
take the button up on the view and set its constraints properly . May be your problem will resolved.
I have a scrollView called sidebar. When I drag my finger on the screen close to the edge of my phone the sidebar pops op. Within the sidebar are UIViews that are subviews of sidebar. Additionally, each view is associated with a viewController. So each view is a subview and the corresponding controller is a childViewController of the subview. How do I recognize when my UILongPress has entered one of the views in my scrollView
I am trying to have a button that is located on the bottom and when the user taps on it it will slide up to show the menu. How is this possible using code or is there an api or anything that I can use to make this possible in the easiest way?
Your screenshot shows a view whose frame is animated when the button is pressed so that either the height of the view, or more likely just the position, is changed so that the view becomes visible. This is a simple UIView animation and the view being added so it is hidden behind the button initially.
Check out the iOS documentation for Animating Views https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html
You should be able to create the view and its content either with the interface builder or in code. Start with the view off the bottom of the screen and then use animateWithDuration:animations: using the frame property.
I have a container UIViewController with a child that acts as a menu. This loads the other child UIViewController. I would like the other UIViewControllers to animate in and out behind the menu which is semi-transparent. I have only been able to make it work when the other children are above the menu (shorter than the entire screen so menu has room on the bottom) but have not achieved a sliding effect behind the menu. Is this effect possible?
Assuming you are adding menuController view and new viewController view's as subViews to containerViewController view.
First add that new viewcontroller view as child to containerView's view.
Now that view will be on top of menu's view.
Now bring the menu view to top by
[containerView bringSubViewToFront:menuView];
Above instruction makes menu view to be on top of sliding viewController's view.Now do the sliding animation on new viewController's view.
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.