Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-09-2008, 11:43 PM   #2 (permalink)
tkilmer
Registered Member
 
tkilmer's Avatar
 
Join Date: May 2008
Posts: 583
Default

I personally add a BOOL. I make it something like tappedTwice. I set it equal to YES once I enter the double count and I set up the single count to not run if tappedTwice is equal to YES. I have the value reset to NO once I know I can again. Without looking at my code, this is how I do it:
Code:
 BOOL tappedTwice = NO;
if ([touch tapCount] == 2) {
tappedTwice = YES;
//whatever here
}
else if ([touch tapCount] == 1 && !tappedTwice) {

//whatever here
}
}
If it is setup as a local BOOL, then you do not have to worry about setting it back to NO. This works for me, hope it works for you.
tkilmer is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,822
Threads: 89,206
Posts: 380,634
Top Poster: BrianSlick (7,129)
Welcome to our newest member, gladlard24
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:23 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.