At the moment I have 4 uiviews acting like a menu with another uiview above it acting as the menu reveal button which requires a long press to show the 4 uiviews. A user needs to long press on a uiview to show the uibuttons (menu) and then they would slide down over one of the uiview and then release the press. How can I tell which uiview the slide ended on.
Similar to how the 3D touch menus work.
Related
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.
All:
I am working on an app in which I have multiple UIButtons and UITextFields on the top and right hand side of a UIView. The UIViewController is embedded in a tab bar controller, and I'm using iOS 7.
When the view first appears, the UIButtons and UITextFields on the right are unresponsive -- they are enabled (according to .isEnabled), but the buttons don't flash, and the keyboard doesn't appear when I tap on the UITextField. If I switch to another tab and then back, they work.
The controls at the top work as expected.
However, if I drag the right hand side controls more towards the center of the app, they work first time. There's like a 100 pixel "dead zone" that only goes away when I switch tabs.
Update: If I bypass the tab bar controller completely, and make the view controller associated with the above the initial view controller, then the controls work as they should.
What is going on??
Thanks,
Michael
Just got this weird problem, where I have a scroll view and buttons in the scroll view. I want to display a UIPopover from the button when touched, with UITextFields inside the UIPopover. The problem comes when the Keyboard appears. In certain cases, when the UIButton is so high in the view that the popover can only be displayed under it with the UIPopoverArrowDirectionUp, and when keyboard pops in, this popover cannot move any more up and therefore magically disappears to the top left corner (probably some Apple thing).
My solution is to check the frame of the UIPopover and to check that there is enough space for the keyboard, and if not, scroll the UIScrollView up with the buttons as well in order to be able to push the UIPopover up and so make sure that both the Keyboard and the popover fit.
So the question is: Is it possible to move the popover as the button moves?
Thanks
I have used two uibarbuttonitems and added a flexible style between them to adjust them at left and right. But when I click just near the buttons the respective actions are got called, even I don't click on the button (here fox example I clicked approx 20px before the right bar button). can any one explain why the action is performed when i click outside of the button not inside it. I check it with custom uitoolbar also and it is show the same problem.
Cocoa-Touch controls usually have larger active touch areas than they are visible on screen. Especially with bar buttons, the touch area can be dynamically enlarged if there are no other bar buttons nearby.
I'd like to implement a sidebar that is revealed/hidden with a custom gesture.
Sidebar - A small window that appears either on the left or right. It shouldn't be huge, but big enough to encompass a few buttons and maybe some text.
Custom Gesture - I want a swipe to reveal/hide the sidebar very similar to what is done with the notification center in iOS 5. With the notification center, you place your finger at the top and swipe down. I'd like a similar gesture. So if the user has his/her finger to the left of the screen and swipes his/her finger onto the screen, then reveal the sidebar on the left. To hide it, just do the reverse gesture. Ditto for showing the sidebar on the right.