Display/Stage loses focus after touching iAds [b56]

JensWinterstein

  • *
  • Posts: 433
After tapping an test iAd and returning to the app, I wasn't able to control anything anymore.

« Last Edit: October 20, 2011, 01:11:17 am by Jon »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon-iPad

  • *
  • Posts: 166
Hmm, I'll look tonight. What printout values does it give for touch input?

JensWinterstein

  • *
  • Posts: 433
When touching the iAd, the print command stops working and doesn't print any x/y touch coordinates to the console anymore.

Code: [Select]
-(void)update
{
  for (SPTouch* touchPoint in [Game game].startTouches)
  {
NSLog(@"%@", [NSNumber numberWithFloat:[self getTouchX]]);
NSLog(@"%@", [NSNumber numberWithFloat:[self getTouchY]]);
  }
}

« Last Edit: September 28, 2011, 10:13:51 am by JensWinterstein »
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

JensWinterstein

  • *
  • Posts: 433
Thought it might be fixed due to patch note "Foregrounds make touch undetectable [b47]", but it's still happening in b47.
Get 100 Chambers for Android / iOS
Get Cubus Velox for Android / iOS or play it on Flash

- Portfolio

Jon

  • *
  • Posts: 17529
Not related to this.

Jon

  • *
  • Posts: 17529
This seems to be the cause. The iAds view is consuming all of the touch events, even in the places it's transparent. We can't actually make it smaller than the whole screen because it uses the scroll screen when it shows something.

http://forum.sparrow-framework.org/topic/touches-on-a-uiwebview#post-1480

Jon

  • *
  • Posts: 17529
Fixed via a completely different approach - what was said there didn't quite work.

The problem had something to do with the ad reappearing at the top for no good reason. I still haven't figured out why it does that but I've worked around it slickly.

With this fixed, I can now look into customizing it a bit for the future.