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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2011, 11:04 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 3
djohnson is on a distinguished road
Exclamation iAd, Cocos2d, and UITapGestureRecognizer

Has anyone noticed a problem with iAds not receiving clicks when used in a cocos2d game and with a UITapGestureRecognizer. I am having a terrible time with the iAd looking like it responded to the click but the delegate methods are never called. I turned off my UITapGestureRecognizer and it works perfectly! The iAd is setup in the RootViewController class and the GestureRecognizers are setup right before running the scene. I have a bare scene with nothing happening other than a CCLOG showing clicks have been received. I am registered with the touch dispatched to NOT swallow touches. Any idea what could be causing this? Thanks!
djohnson is offline   Reply With Quote
Old 02-08-2011, 11:42 AM   #2 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 3
djohnson is on a distinguished road
Default

More tests have shown that the ADBannerView will respond to taps with a UITapGestureRecognizer, but only after 2 seconds. If I disable to UITapGestureRecognizer, it works 100% of the time on a single quick tap.

Forget it though, spent 10 minutes and got everything working with ccTouchBegan, ccTouchEnded, and ccTouchMoved. I guess ADBannerView sets itself up to receive Tap Gestures also and borks everything up.
djohnson is offline   Reply With Quote
Old 03-20-2011, 01:15 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 22
Splatics is on a distinguished road
Default Solution

Quote:
Originally Posted by djohnson View Post
More tests have shown that the ADBannerView will respond to taps with a UITapGestureRecognizer, but only after 2 seconds. If I disable to UITapGestureRecognizer, it works 100% of the time on a single quick tap.

Forget it though, spent 10 minutes and got everything working with ccTouchBegan, ccTouchEnded, and ccTouchMoved. I guess ADBannerView sets itself up to receive Tap Gestures also and borks everything up.
I had this same problem so just fyi for anyone else that comes across this if you add this to your gesture recognizer then it wont cancel out the iAd:
tapRecognizer.cancelsTouchesInView = NO;
Splatics is offline   Reply With Quote
Reply

Bookmarks

Tags
cocos2d, iad, uitapgesturerecognizer

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 421
9 members and 412 guests
7twenty7, chemistry, ChrisYates, hussain1982, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:10 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0