Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@larsacus
Created September 13, 2011 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsacus/1215008 to your computer and use it in GitHub Desktop.
Save larsacus/1215008 to your computer and use it in GitHub Desktop.
LARSAdController - Create Ad in View with View Controller
- (void)viewWillAppear:(BOOL)animated{
[[LARSAdController sharedManager] addAdContainerToView:[self view] withViewController:self];
[[LARSAdController sharedManager] setGoogleAdPublisherId:myPublisherId]; //change publisher id unless you want me to have your monies
[[LARSAdController sharedManager] layoutBannerViewsForCurrentOrientation:self.interfaceOrientation];
}
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
[[LARSAdController sharedManager] layoutBannerViewsForCurrentOrientation:toInterfaceOrientation];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment