ios - iAd restarts game when it pops up -


After "text" itemprop = "text">

You start my app again when it pops the iAd banner it will restart the game it will go normally so suddenly run Back to all the progress on the Start Title screen:

This is my ViewController.h

  #import & lt; UIKit / UIKit.h & gt; #important & lt; Spritekit / Spritekit H & gt; The @interface ViewController: UIViewController @end  

And this ViewController.m

  #import "ViewController.h" #import "MyScene.h" # import & Lt; IAd / iAd.h & gt; @ Interface view controller () & lt; ADBannerViewDelegate & gt; @property (nonatomic, strong) ADBannerView * banner; @end @implementation ViewController - (minus) bannerView: (ADBannerView *) banner didFailToReceiveAdWithError: (NSError *) error {if (banner.isBannerLoaded) {[UIView beginAnimations: @ "animateAdBannerOff" context: nil]; // Assume that the banner is placed at the bottom of the screen. Banner.frame = cgffset (banner.frame, 0, banner.frame.edight.height); [UIView commitAnimations]; }} - (void) bannerViewDidLoadAd: (ADBannerView *) banner {if (banner.isBannerLoaded!) {[UIView beginAnimations: @ "animateAdBannerOn" context: nil]; // Assume that the banner is at the bottom of the screen. Banner.frame = CGRectOffset (banner.frame, 0, -banner.frame.size.height); [UIView commitAnimations]; }} - (zero) viewDidoad {[Super Viewedload]; // View Configure SKView * skView = (SKView *) self.view; SkView.showsFPS = No; SkView.showsNodeCount = No; // Create and configure view SKEsine * View = [Size with MyScene view: skView.bounds.size]; Scene.scaleMode = SKSceneScaleModeAspectFill; // present the scene [SkView presentScene: view]; } - (Zero) View GameLayoutView Visual [{Super ViewWall LightsSubview]; Self.banner = [[ADBannerView alloc] initWithFrame: CGRectZero]; Self.banner.delegate = self; [Self. Banner size tofitt]; Self.canDisplayBannerAds = Yes; SKView * View = (SKView *) self.originalContentView; Skesin * scene = [[Maissen light] Init with Sisijh: Sijisijhmek (Self. V. U.a.frem. Size.width, self.view.frame.size.height)]; [View current] View: view]; } - (BOOL) should be metatitive {return yes; } - (Ansuintegr) on supported interfaces Orenteshn {if ([[Uaidiivis device] User Intrfesaidiom] == UI user interface Aidiofonfon) {return Uaiantifereshnorenteshnmask Sbbut Upisdaun down; } And {return UIInterfaceOrientationMaskAll; }} - (zero) done rescue memorisation {[super dysrhymmy warning]; // Use any cached data, images, etc. which are not in use. } I think call to  viewWillLayoutSubviews  @end  
Being done again when the IAD scene comes up.

Put an NSLog there to verify it. If so, then try moving everything in viewDidAppear or viewWillAppear instead.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -