Before proceeding this chapter, be sure that you already finished SDK settings. If not, check 4) iOS Settings first. [TnkInterstitialAd] Three steps to show an interstitial ad : 1) allocate an object of TnkInterstitialAd 2) invoke prepare 3) invoke show. Sample below show the simplest way to show a non-incentive interstitial ad on your iOS app. For incentive interstitial ad, set parameter TNK_PPI when invoking prepare method. [Display Logic] To control each interstitial Ads in different locations, you have to use 'Display logic'. (See Display Logic) You can put a name of display logic at the end of prepare method. [Using Delegate] To catch events when an interstitial ad is loaded or users close interstitial ads, use TnkInterstitialDelegate protocol. You can set TnkInterstitialDelegate object by passing it the second parameter of prepare method or by directly assigning to TnkInterstitialAd object. Following sample code shows how developers can control displaying interstitial ads using TnkInterstitialDelegate [TnkInterstitialAd Interface] - properties
- prepareMethod - (void) prepare - (void) prepare:(NSString *)logicName - (void) prepare:(NSString *)logicName delegate:(id<TnkInterstitialDelegate>)delegate Description Load an interstitial ad from server.
- showMethod - (void) show - (void) show:(UIViewController *)viewController Description Display an interstitial ad loaded by prepare invocation.
|
4. Interstitial Ad >