title: iAd shared for UIViews
body: <p>I am using an iAd for sharing among views, but there are two strange issues which I have been browsing over the internet for solution without finding clue, therefore I post my question and code here for brain storming.</p>
  
  <p>.h:
      @interface AppDelegate : NSObject  {
      UIWindow *window;
      ADBannerView *adBanner;</p>
  
  <pre><code>appViewController *viewControllerApp;
  }
  </code></pre>
  
  <p>.m</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
  (NSDictionary *)launchOptions {
  
  adBanner = [[ADBannerView alloc] initWithFrame:CGRectZero];
  adBanner.currentContentSizeIdentifier =ADBannerContentSizeIdentifierLandscape;
  adBanner.delegate = self;
  adBanner.backgroundColor = [UIColor whiteColor];
  adBanner.autoresizingMask = UIViewAutoresizingFlexibleWidth | 
  UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;
  //----------------------------------------------------------------------------------
  
  [window addSubview:viewControllerApp.view];
  [window makeKeyAndVisible];
  
  return YES;
  }
  
  appViewController.m
  -(void)viewWillAppear:(BOOL)animated
  {
  //#ifdef LITE_VERSION
      [SharedAdBannerView  setFrame:CGRectMake(0, 40, 0, 0)];
      [self.view addSubview:SharedAdBannerView];
  //#ifdef
  }
  </code></pre>
  
  <p>somewhere in the appViewController.m:</p>
  
  <pre><code>{....
      playGameView = [[PlayGameViewController alloc] initWithNibName:@"PlayGameViewController"
          bundle:nil];
      [self.view insertSubview:playGameView.view atIndex:10];
  }
  </code></pre>
  
  <p>So, there are two questions:
  1. when the App is running, the iAd isn't displayed on the right position (shall be 
  0,40,0,0) but it doesn't show up unless I changed the position to (0,180,0,0), but it 
  actually wasn't on the 0,180. it looks like on 0,40.</p>
  
  <ol>
  <li>When I move to 2nd view (PlayGameView), then click on the iAd, the iAd shows a full 
  screen View, then I close the iAd, the screen of PlayGameView was gone! it was replaced by
  the rootView!! how can I close the iAd with the PlayGameView stays?</li>
  </ol>
  
  <p>I don't see problem at rootView when the iAd is clicked and closed.. anyone can help will be
   highly highly appreciated!</p>
  
  <p>BR
  Georg</p>