pod “FBAudienceNetwork”;
import FBAudienceNetwork
func loadFBBannerAd() {
NSLog("loadFBBannerAd ENTRY")
bannerAdView = FBAdView(placementID: "<Placement ID from the backend manager>", adSize: kFBAdSizeHeight50Banner, rootViewController: self)
bannerAdView.frame = CGRect(x: 0.0, y: 20.0, width: self.view.bounds.size.width, height: 50.0)
bannerAdView.delegate = self
self.view.addSubview(bannerAdView)
NSLog("Banner width is \(bannerAdView.frame.width)" )
bannerAdView.loadAd()
}
No comments:
Post a Comment