Skip to content

Instantly share code, notes, and snippets.

@flurrydev
Created October 30, 2018 18:52
Show Gist options
  • Select an option

  • Save flurrydev/66cc710154722cbe5b52bafe18068153 to your computer and use it in GitHub Desktop.

Select an option

Save flurrydev/66cc710154722cbe5b52bafe18068153 to your computer and use it in GitHub Desktop.
Swift sample native ads
var nativeAd = FlurryAdNative(space:"staticAds")
var nativeAds: [FlurryAdNative] = []
override func viewDidLoad() {
super.viewDidLoad();
for _ in 1...5 {
nativeAd?.adDelegate = self;
nativeAd?.viewControllerForPresentation = self;
nativeAd?.trackingView = self.containerView
// Request the ad from Flurry
nativeAd?.fetchAd();
nativeAds.append(nativeAd!)
nativeAd = FlurryAdNative(space:"staticAds")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment