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, 03:37 PM   #1 (permalink)
eitangabay
New Member
 
Join Date: Aug 2008
Posts: 17
Default 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.

Code:
- (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/ip...ble-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.
eitangabay is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,798
Threads: 89,205
Posts: 380,608
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Frasier2027
Powered by vBadvanced CMPS v3.1.0

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