Skip to content

Instantly share code, notes, and snippets.

@ydn
Last active August 29, 2015 14:22
Show Gist options
  • Save ydn/eb75655a0283e3a5b0e6 to your computer and use it in GitHub Desktop.
Save ydn/eb75655a0283e3a5b0e6 to your computer and use it in GitHub Desktop.
Alternate Banner Sample (Full) with Swift
class ViewController: UIViewController, FlurryAdBannerDelegate {
let adBanner = FlurryAdBanner(space: "ADSPACE");
override func viewDidAppear(animated: Bool){
super.viewDidAppear(animated);
adBanner.adDelegate = self;
adBanner.fetchAdForFrame(self.view.frame);
}
// Show whenever delegate is invoked
func adBannerDidFetchAd(bannerAd: FlurryAdBanner!) {
// Received Ad
adBanner.displayAdInView(self.view, viewControllerForPresentation: self);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment