Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Step 1:</p> <blockquote> <p>1.import iAd Framework to the Application.</p> <p>2.Provide #import in the particular controller where you want to show your Add.</p> <p>3.Provide it’s delegate UIViewController </p> <p>4.Provide one view to that particular ViewController.Assume I have taken</p> </blockquote> <pre><code>@property (weak, nonatomic) IBOutlet UIView *contentView; </code></pre> <p>Step 2:</p> <p>Allocate it in ViewDidLoad method</p> <pre><code>- (void)viewDidLoad { _bannerView = [[ADBannerView alloc] init]; _bannerView.delegate = self; [super viewDidLoad]; [self.view addSubview:_bannerView]; } </code></pre> <p>step 3:</p> <p>Provides it’s delegate methods which i have mention bellowed.</p> <pre><code>- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation)) { _bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait; } else { _bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape; } [self layoutAnimated:duration &gt; 0.0]; } - (void)bannerViewDidLoadAd:(ADBannerView *)banner { [self layoutAnimated:YES]; } - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error { [self layoutAnimated:YES]; } - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave { return YES; } - (void)bannerViewActionDidFinish:(ADBannerView *)banner { } - (void)layoutAnimated:(BOOL)animated { if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) { _bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait; } else { _bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape; } CGRect contentFrame = self.view.bounds; CGRect bannerFrame = _bannerView.frame; if (_bannerView.bannerLoaded) { contentFrame.size.height -= _bannerView.frame.size.height; bannerFrame.origin.y = contentFrame.size.height; } else { bannerFrame.origin.y = contentFrame.size.height; } [UIView animateWithDuration:animated ? 0.25 : 0.0 animations:^{ self.contentView.frame = contentFrame; [self.contentView layoutIfNeeded]; _bannerView.frame = bannerFrame; }]; } </code></pre> <p>For More Detail Please refer this <a href="http://iosrider.wordpress.com/category/iad/" rel="nofollow">link</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload