Handling Tap and Double Tap

I'm following the example code in the iPhone OS Programming Guide for dealing with the complication of having your application handle both single taps and double taps in different ways under the section on Handling Multi-Touch events.
I'm running into a scenario where both a single tap and a double tap are registered as part of an attempted double tap. It seems to be an issue with timing. It seems that even though the cancelPreviousPerformRequestsWithTarget gets called on the delayed single tap gesture that it is too late and it fires anyways and then it still goes on to register the double tap also.
This seems to happen only if the timing is exactly right. A fast double tap and it works fine. A double tap slower than the performSelector withObject afterDelay for the first tap and it only registers the single tap as expected. However, the issue seems to occur is the the timing in between the two taps is exactly the the same as the single tap delay (.2 seconds is what I'm using).
Has anyone else run into this and found a solution, or am I doing something wrong perhaps?
Thanks,
-Keith

I think I found my problem. The first touch and the second touch were on separate pieces of my game board. So I was calling perform action with delay on the first, but canceling it on the object under the second touch. That is why the cancel message was not going through.
Thanks,
-Keith

Similar Messages

  • My trackpad in Macbook is not working properly. The tap and double tap is not working but other gestures are working. Please help me..thanks

    My trackpad in Macbook is not working properly. The tap and double tap is not working but other gestures are working. Please help me..thanks

    Portables and Magic Trackpad: Jumpy or erratic trackpad operation
    Might be something from that link that will help.

  • Track Pad single tap and double tap not working

    Dear All,
    I have a MBP A1226 model with intel 2.2 GHz Core 2 uo processor. With Mac OSX ver 10.8.4.
    My system had developed a snag, was not booting up. I booted up thru the rcovery disk and after the disk repair did not help, did a drive erese and a fresh install.
    All seems to work well except that the trackpad does not respond to single aswell as double tap. Scrolling is working fine.
    Help to resolve this issue will be appreciated.
    BTW trackpad was functinal before the snag.
    Regards

    I suspect the trackpad settings were reset when you did your fresh install of Mac OSX.
    to fix this, open up Settings>Trackpad>"Point & Click" tab.
    Here you will find tons of settings that wil let you customize how your trackpad works. More specifically, you will want to enable "Tap to Click".
    Hope this helps!

  • When I go to the calander function on my I pad and double tap... Nothing happens.... Can not enter calander data... What am I doing wrong?

    When I go the calander and double tap nothing happens.... What am I doing wrong?

    There should be a + sign in the lower right corner. Tap that to add an event. If there is no + sign - go to Settings>iCloud>Calendar and toggle the setting on and off.
    If you want to sync your calendar with iCloud - leave it on - but don't sync the calendar from your computer or you may get duplicate entries.

  • TS3274 On my ipad, why do I have to highlight and double tap to do something. How do I disable that function.

    I changed something on my iPad and now I have to tap to highlight and then double tap to get the function I highlighted. How do I disable this?

    Go to Settings > General > Accessibility > VoiceOver and turn this Off.

  • Hyper sensitive trackpad and double tap minimizes

    I wonder if the trackpad on the new MacBooks has not become too sensitive now? Sometimes I am just hovering over it with the fingers, not touching, and it acts like I have been tapping, closing windows, popping up menus etc. Another in here asked for the options to set the sensitivity and it does not exist, but he got the advice to choose an option he could not find in the Sys Prefs and neither can I, something which has to do with ignoring accidental clicks.
    Could it be that they have forgotten to add that option in other languages? I run my Macs with Norwegian set as primary language.
    Another odd thing is that the option to double tap to drag does not work, either. When I double tap (with one finger) it minimizes the window and send it into the Dock...
    Anyone else who have experienced oddities with the trackpad and is there a solution? Otherwise, it works well enough.

    All updates have been installed and I guess you think of the firmware and the other which came one after another. It is actually after those I noticed the increased sensitivity. As for the minimizing, it seems like there is a very fine difference between touching and tapping twice. Sometimes it works to drag and sometimes it minimizes.
    Well, it is a minor problem but I got curious as someone replied to another topic here that there should be an option to ignore accidental input, but I haven´t found that option in Sys Prefs and wonder if that has been forgotten in the Norwegian localization...

  • Synptics / hal and double tap broken

    I can't double tap with one finger anymore here on my Samsung notebook. I have to tap tree times to get a double click effect.
    [andyrtr@laptop64 ~]$ lshal -u platform_i8042_i8042_AUX3_port_logicaldev_input
    udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input'
    info.capabilities = {'input', 'input.touchpad'} (string list)
    info.category = 'input' (string)
    info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
    info.product = 'SynPS/2 Synaptics TouchPad' (string)
    info.subsystem = 'input' (string)
    info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port_logicaldev_input' (string)
    input.device = '/dev/input/event9' (string)
    input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_AUX3_port' (string)
    input.product = 'SynPS/2 Synaptics TouchPad' (string)
    input.x11_driver = 'synaptics' (string)
    input.x11_options.AccelFactor = '0.0028' (string)
    input.x11_options.ClickFinger1 = '1' (string)
    input.x11_options.ClickFinger2 = '3' (string)
    input.x11_options.ClickFinger3 = '2' (string)
    input.x11_options.FingerHigh = '30' (string)
    input.x11_options.FingerLow = '25' (string)
    input.x11_options.FingerPress = '255' (string)
    input.x11_options.HorizEdgeScroll = '1' (string)
    input.x11_options.HorizScrollDelta = '1000' (string)
    input.x11_options.HorizTwoFingerScroll = '0' (string)
    input.x11_options.LBCornerButton = '0' (string)
    input.x11_options.LTCornerButton = '0' (string)
    input.x11_options.MaxDoubleTapTime = '200' (string)
    input.x11_options.MaxSpeed = '0.45' (string)
    input.x11_options.MaxTapMove = '220' (string)
    input.x11_options.MaxTapTime = '180' (string)
    input.x11_options.MinSpeed = '0.18' (string)
    input.x11_options.PalmDetect = '0' (string)
    input.x11_options.PressureMotionMinZ = '10' (string)
    input.x11_options.RBCornerButton = '3' (string)
    input.x11_options.RTCornerButton = '2' (string)
    input.x11_options.SHMConfig = 'true' (string)
    input.x11_options.TapButton1 = '1' (string)
    input.x11_options.TapButton2 = '2' (string)
    input.x11_options.TapButton3 = '3' (string)
    input.x11_options.VertEdgeScroll = '1' (string)
    input.x11_options.VertScrollDelta = '100' (string)
    input.x11_options.VertTwoFingerScroll = '0' (string)
    linux.device_file = '/dev/input/event9' (string)
    linux.hotplug_type = 2 (0x2) (int)
    linux.subsystem = 'input' (string)
    linux.sysfs_path = '/sys/class/input/input9/event9' (string)
    What's wrong here? Any idea?

    Ummm..I can't work out the 'Quotes' and how to do them on this forum board..so I'll just use bold and different fonts.
    But you mis understand my question...
    Here is part of my original post
    I could double tap the home icon when a dialogue box was open
    Implying that the dialogue box is already open BEFORE I use the double tap function.
    As I go on to further explain, this dialogue box could be from either WiFi asking for a password, or Mail asking for a password, or Mail telling me it can't connect to the Server.
    When you have 8 e-mail accounts and you have to hit OK or Cancel  twice per e-mail account..before you can close the app...it is more than frustrating.  ..all these multiple dialogue or warning boxes and you can't get out of them without acknowledging each of them.  You used to be able to Double tap, and Swipe the preview up to close the app..or jump to another app.
    I understand this perfectly, what you said:
    Double clicking the home button shows the recently opened app icons along the bottom of the screen with a preview above each icon. To open one of the apps, touch the icon and the app opens.  Copy what you want, double click, open the the other app, then paste.  The preview screens are used to close the apps by slideng the screens up.  See this:
    ..and that is what I am trying to do.  But when one of these Mail or Wif bode Dialogues or warnings are open the double tap is not possible..it does not work.  so you can't go to the other app to copy and paste. or slide the preview screen up to close it.

  • Windows 10 upgrade stopped touchpad single and double tapping

    I recently upgraded to the Windows 10 from Windows 7. Now the touchpad single/double tapping not working.  I have an HP laptop.  If there is no solution to this problem then I will just revert back to Windows 7. Thanks,

    I have same problem-I spent about half an hour with microsoft   assistant on phone who eventually after several failed attempts to rectify problem,appeared to give up and advised that touchpad was incompatible  with windows 10 and finally advised that I needed a driver update from HP the manufacturer of my notebook. However I have tried HP support assistant online and my driver is up to date and after several attemps by HP assistant to solve problem I am no further forward and very disappointed-afterall the touchpad is a pretty basic tool of computers/pc -well for those that do not have touch screens Hope you have better luck than I have had today.

  • Just updated to iOS 6.1.3 and double tap doesn't scroll up in safari?

    No matter what I do I have to scroll all the way up. I want to be able to double tap to go to the top. Is there something wrong with my settings?

    Hi Mroxj,
    If you tap the status bar at the top of the iPhone, you will be taken to the top of the web page in Safari.
    See the photo on page 55 of the iPhone User Guide below:
    manuals.info.apple.com/en_US/iphone_user_guide.pdf
    Hope this helps!
    - Judy

  • DVC Pro Tape and DV tape not good in Final Cut Pro 5?

    I have a DVCPro tape along with a deck as well as a DV tape along with a deck for that.
    I started final cut pro and used the NTSC easy setup. I first captured the DVC Pro, when it was done i tried to play it in the viewer and it would play for less then a second then stop. However when i brought it down to the timeline it played fine in the canvas.
    So i when ahead a captured the DV tapes onto the same project. When it was completed i tried to play it back using my DV hardware to my TV but i would only see picture and no audio. ALl my settings were correct and the audio would only play on Mbox or the internal speaker in a G5. I thought i had a bad connection but the DVC Pro tape worked fine with audio. So i figured i go back to the DVC File i captured and when i pulled it up in the viewer everything is green and no picture what so ever.
    Can anyone please help

    #8 External Monitor Viewing.
    Shane's Stock Answer #8:
    A simple path is mac > firewire > camera or deck > rca cables > tv
    Then start up your camera and tv, then open fcp.
    Then go View > External video > all frames
    Video playback should be Apple firewire NTSC (If you are using an NTSC set)
    Audio playback should be Audio follows Video
    Techinially, this should send synched video to your TV
    If for some reason you can't view your timeline on your external monitor, there are a few things to try:
    1) Make sure that the camera/deck is connected and powered on BEFORE you open FCP.
    2) In the Final Cut Pro menu select AUDIO/VIDEO Preferences and make sure your signal is being sent out thru Firewire DV.
    3) Go to the menu and select VIEW>EXTERNAL>ALL FRAMES.
    4) Click in the % box above the image and select FIT TO WINDOW.
    5) Go to VIEW->refresh A/V devices
    6) Make sure the Log & Capture window is closed
    If you want it to play in both the canvas and the external monitor you need to go to the FINAL CUT PRO menu and select AUDIO/VIDIO settings and make sure MIRROR ON DESKTOP is selected under the PLAYBACK OUTPUT section
    Shane

  • Trackpad double tap is terrible

    Has anyone else noticed the trackpad double tap to not work correctly?
    I've pretty much given up when it comes to double tapping and resorted back to the button to double click.
    It's getting pretty annoying, especially when I have to double click a bookmark out of the bookmark collection.

    Try resetting Parameter memory (PRAM). If your PRAM contents are wrong, all sorts of odd hardware-ish problems can result.
    I presume you have also tried adjusting the trackpad settings in System Preferences, correct?
    Trackpad tapping, double-tapping, and double-tap with drag all seem to work fine on the Macs I'm using.
    --Bob

  • Ipod nano 7th generation having issues with the UI. Out of box everything worked great. Once I snyc the device and it finished, the UI becomes unuesable. You have to double tap every icon in order to open music, videos, etc.  I cannot swipe to the second

    ipod nano 7th generation having issues with the UI. Out of box everything worked great. Once I snyc the device and it finished, the UI becomes unuesable. You have to double tap every icon in order to open music, videos, etc.  I cannot swipe to the second page of icons,  black box appears around an icon and then switches to a different one anytime I swipe. A box even appears around the time and battery power. iPod & iTunes are both updated. What is the FIX on this issue?

    I had this problem as well.  This is what I found by searching online.  I tried the fix on my nano 7th gen and it worked.  I hope this helps you.  Make sure to use two fingers for sliding and double-click the icons to get into settings.  Good luck.
    It would seem that Voiceover has been enabled on your iPod Nano. The following article contains information regarding Voiceover, and how to disable it once it's been enabled.
    iPod nano (6th generation and later): How to use VoiceOver
    http://support.apple.com/kb/HT4317
    To turn off VoiceOver on iPod nano using VoiceOver gestures
    From the Home Screen, swipe right or left with two fingers until you see or hear "Page 2 of 2" on iPod nano (7th generation) or "Settings" on iPod (6th generation).
    If the icons have been rearranged, or if there are more than four Home screens, you may hear something different.
    Slide one finger around the screen until you hear Settings. 
    Double-tap to open Settings. 
    Slide your finger up or down the screen until you see or hear General, then double- tap. 
    Slide your finger up or down the screen until you see or hear Accessibility, then double-tap. 
    Slide your finger up or down the screen until you see or hear VoiceOver, then double-tap. 
    Double-tap when you hear "VoiceOver switch button on." 
    You'll hear "VoiceOver off" to confirm the setting. Now you can use standard gestures to control iPod nano.
    Note: You can also turn off VoiceOver by resetting your iPod.

  • Can double tap action override table view tap functionality?

    So I have a table view object in my view...if you select a row, it executes the "didSelectRowAtIndexPath" method in my code.
    I would like the user to have the ability to double-tap (in quick succession) a row however, and register a different type of action. Is this possible to do without overriding the existing "didSelectRowAtIndexPath"...or will I need to write my own single-tap/double-tap logic using onTouchesBegin and then forget about using the whole "didSelectRowAtIndexPath" functionality?
    The main issue, is I don't want to have to lose the benefit of the single-tap and knowing the indexPath value...but when I do a double tap, it won't really matter where I'm at...

    Here's the best info I've found on this topic so far: [http://idevkit.com/forums/general-sdk/43-custom-uitableview-double-tap.html]. It looks like the author has read Handling Single and Multiple Tap Gestures in the +iPhone Application Programming Guide+ and has overcome most of the problems, but I haven't tried any of that code myself yet.

  • Tap & Double Tap.

    Hi,
    I know that a lot of threads are opend for this problem but yet, I haven't found a solution for this problem.
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    // We only support single touches, so anyObject retrieves just that touch from touches
    UITouch *touch = [[event allTouches] anyObject];
    if ([touch tapCount] == 2) {
    //Do A
    // In case of a double tap outside the placard view, update the placard's display string
    else if ([touch tapCount] == 1) {
    //DO B
    The problem is, if i double tap, the B function is executed also.
    I found this thread:
    http://www.iphonedevsdk.com/forum/iphone-sdk-development/2108-single-touch-event -always-get-fired-double-touch.html
    and he said there that this is the behavior... what does he means ?
    95% of all the posts use the 'tapCount'.
    I've even try to use:
    UIControlEventTouchDownRepeat & UIControlEventTouchUpInside, with IBActions, and always the UIControlEventTouchUpInside call first...
    How do i handle ONLY double tap ?
    Thanks.

    If you ONLY want double tap events then ignore single taps.
    If you want both to work single and double taps to work you'll have to wait a given amount of time and see if the user has tapped again.
    The Programming guide has a starting point code snippet for this.

  • Unable to Double Tap with TrackPad or B/T Mouse after 10.8.2 upgrade

    Hello:
    Could some kind person possibly help a Mac newb?
    For some strange reason, I am unable to Double Tap using *either* my TrackPad or Bluetooth Mouse immediately after upgrading my Mid 2011 iMac from OS X 10.6.8 to 10.8.2.  Single tapping on any file highlights the file name and double tapping the file name (not the icon) allows renaming the file (which I believe is all normal).  All other gestures appear to function normally - just can't double-tap TrackPad or double-click the Mouse.
    ALREADY TRIED:
    Shutting down and removing all power cords and cables to the computer.
    Removing the batteries from TrackPad & Mouse.
    Creating a new user account.
    Reinstalling OS X 10.8.2 including updates 3 times.
    Booting into Safe Mode then running Disk Utility to Repair Disk Permissions and Repair Disk.
    Running Capture_Data.dmg and sending the files to Apple Support.
    Apple Senior Advisor said that their Software Engineer did not notice anything out of the ordinary, but is now digging deeper.
    Deleted com.apple.Bluetooth.plist & com.apple.PowerManagement.plist per Apple.
    Cleared browser cache & history, then emptied trash.
    I am currently working with a Senior Advisor at Apple since 02.01.2013 (10 days) to follow-up on the same issue as a previous case opened on 01.14.2013 after upgrading the OS X on 01.12.2013.  Apple originally suggested that I take my iMac to the Apple Store for diagnostic testing, which I have avoided because everything was working fine before the upgrade and then I noticed the same issue with the my mouse.  I decided to hold off wiping the system clean, doing a clean install then migrating my data and settings from the backup until my Apple Advisor tells me if their Software Engineer discovers anything else after they dig a little deeper into the diagnostic report.  But that could take weeks and right clicking to open files is getting old real fast.  Besides, my Adobe CS6 apps rely heavily (if not entirely) on double & triple clicks, so I am paralyzed from using any of their products.
    Since Apple said they have no reported cases like this, I have done a lot of digging on my own before writing this.  Sorry about the long post, but I was hoping to provide as much detail as possible to be respectful of everyones valuable time.  Any help or suggestions would be greatly appreciated.
    Regards,
    Doug Klimek

    Problem Solved in less than 5 minutes - Thank you Travis @ AppleCare!
    SOLUTION:
    Set the Mouse & Trackpad Double-Click speed to any value other than "Fast". The slider bar has 10 settings (1=Slow to 10=Fast) so I set mine to 9 and it works fine.  But your system may respond differently, so you might want to start with #5 (Middle) and go from there.  FWIW, the #10 setting (Fast) does work, however I had to use one finger on each hand because I couldn't tap fast enough with only one hand.
    HERE'S WHAT TO DO:
    Click the Apple Logo > System Preferences > System > Accessibility > Mouse & Trackpad > Double-click speed > Drag slider to the #5 setting (Middle of bar) then tweak to your liking
    FYI ONLY:
    FWIW, I had no Double-Click problems when setting the Mouse & Trackpad Tracking to #10 (Fast) as long as the Double-Click speed (above) was set to any value other than #10 (Fast).  I am only mentioning this to share what I learned.
    Click the Apple Logo > System Preferences > Hardware > Mouse > Point & Click > Tracking > Drag slider bar to your liking
    Click the Apple Logo > System Preferences > Hardware > Trackpad > Point & Click > Tracking Speed > Drag slider bar to your liking
    Hope this information is helpful to anyone before consider wiping their disk clean and doing a fresh M/L reinstall like i almost did.

Maybe you are looking for

  • How to send a ton of data to Servlet

    Hi, I have a servlet to which I want to feed a ton of data from a c++ client that I have built. I do this by doing a GET request over a socket and then recieve data back. The following is my request: GET /servlets/ConvertRequest?req=<a ton of data> T

  • Continue the package execution even if task fails

    I have a send mail task in my package which sends start and end mails of the package. If the SMPT server is down and not working entire process stops as send mail task fails. Is there a way that if the SMPT server is down and also if the send mail ta

  • CORBA: Using IOR with Aurora Visibroker

    The problem is about Oracle CORBA session oriented: I would like to store an IOR in an Oracle Database in order to use it when I need the object associated but, If I have the IOR of an object instantiated from a class placed in the Name Service Conte

  • My curve just stopped working and is under warranty, how do I go about replacing it?

    Was charging in the wall and checking texts and the screen went white and then off.  Phone won't charge or turn on.  It's never been wet or abused and worked perfectly up to that point.  I was able to find the Warranty PDF on the website, but it does

  • Finder crash when opening iTunes add to library.

    When i open itunes ( 11.1.3 ) on Mavericks ( OSX 10.9 ), it opens fine, but when i click on Add to library, it opens the finder window and then immediatly crashes. can anyone help?