문제

I have read up on the iAd docs and am familiar with the delegate methods and there doesn't appear to be a method that runs when an iAd Banner ad is clicked.

I want to be able to pause the game when the ad is clicked:

[self pause];

Is there an App Delegate method that runs or some other method that I can run so I can accomplish this?

도움이 되었습니까?

해결책

Use these delegate methods of iAD :

Called when the user tapped banner view.

- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
   [self pause]
   return YES;
}

Called after a banner view finishes executing an action that covered your application’s user interface.

- (void)bannerViewActionDidFinish:(ADBannerView *)banner
{ 
   [self play]
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top