# iOS でのインタースティシャル広告の実装

> iOS アプリケーションにインタースティシャル広告を実装します。広告コンテンツをロードし、Objective-C または Swift コードを使用して表示し、デリゲートを使用して広告イベントを処理します。

## インタースティシャル動画広告の例##interstitial-video-ad-example

[`show`](/grow/ads/ios-sdk/ios-api.md#show) メソッドを使用してロードされた広告を表示し、[`UnityAdsShowDelegate`](/grow/ads/ios-sdk/ios-api.md#unityadsshowdelegate) デリゲートを使用してさまざまな表示イベントのロジックをハンドルします。この例では、ボタンで広告をトリガーします。

1. **Objective-C**

   ```objective-c
   // クリックされると show メソッドを呼び出すボタンを実装します: 
   #pragma mark : ボタン
   - (IBAction)showInterstitialButton:(UIButton *)sender {
     [UnityAds show:self placementId:@"Interstitial_iOS" showDelegate:self];
   }

   // Implement callbacks for events related to the show method:
   #pragma mark:UnityAdsShowDelegate
   - (void)unityAdsShowComplete:(NSString *)placementId withFinishState:(UnityAdsShowCompletionState)state {
     NSLog(@" - UnityAdsShowDelegate unityAdsShowComplete %@ %ld", placementId, state);
   }

   - (void)unityAdsShowFailed:(NSString *)placementId withError:(UnityAdsShowError)error withMessage:(NSString *)message {
     NSLog(@" - UnityAdsShowDelegate unityAdsShowFailed %@ %ld", message, error);
     // Optionally execute additional code, such as attempting to load another ad.
   }

   - (void)unityAdsShowStart:(NSString *)placementId {
     NSLog(@" - UnityAdsShowDelegate unityAdsShowStart %@", placementId);
   }

   - (void)unityAdsShowClick:(NSString *)placementId {
     NSLog(@" - UnityAdsShowDelegate unityAdsShowClick %@", placementId);
   }
   ```

**次のステップ**: 実装を改善するには、[iOS でのリワード広告の実装](/grow/ads/ios-sdk/rewarded-ads.md) に関するドキュメントを参照してください。
