// Import the SDK header file and declare that you are implementing // the FBAdViewDelegate protocol: #import @interface MyViewController : UIViewController // Other code might go here... @end // In your View Controller, create a new instance of the FBAdView // and add it to your view hierarchy: - (void)viewDidLoad { [super viewDidLoad]; FBAdView *adView = [[FBAdView alloc] initWithPlacementID:@"264293564021066_264294194021003" adSize:kFBAdSize320x50 rootViewController:self]; adView.delegate = self; [adView loadAd]; // Reposition the adView // ... [self.view addSubview:adView]; } // Now that you have the basic code running, it is recommended that you use // the FBAdView delegate to get notified when the ad fails to load so you // could hide the banner unit. In the same way, you can add it back when it // was loaded: - (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error; { NSLog(@"Ad failed to load"); // Add code to hide the ad unit... // E.g. adView.hidden = YES; } - (void)adViewDidLoad:(FBAdView *)adView; { NSLog(@"Ad was loaded and ready to be displayed"); // Add code to show the ad unit... // E.g. adView.hidden = NO; }

Header Ads

ARISTOCERS

                                  ARISTOCERS 


Aristocress was a Greek Cosmologist. Much insights about him are not known. He lived around 310 B.C.

Aristocres was the Cosmic Scientist to declare that earth turns round the ocean and not the sun around the Earth. It was this researcher who gave much dependable data with respect to the side of and separation between planets. This data is observed to be exceptionally helpful current space think about.
ARISTOCERS ARISTOCERS Reviewed by vijaykumar on 21:04 Rating: 5

No comments:

Ad Home

Powered by Blogger.