> For the complete documentation index, see [llms.txt](https://adpopcornssp.gitbook.io/ssp-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adpopcornssp.gitbook.io/ssp-sdk/sdk/ios/ios-3.1.0+/undefined-11.md).

# 스플래시광고

<figure><img src="/files/yZLhiiqcdMThmziGis2u" alt="" width="214"><figcaption></figcaption></figure>

## 인스턴스 생성

{% tabs %}
{% tab title="Swift" %}

```swift
import APSSPSDK

var splashAd: APSSPSplashAd!

splashAd = APSSPSplashAd(
    frame: view.bounds,
    appKey: "YOUR_APP_KEY",
    placementId: "YOUR_PLACEMENT_ID",
    viewController: self
)
splashAd.delegate = self
view.addSubview(splashAd)
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
@import APSSPSDK;

APSSPSplashAd *splashAd = [[APSSPSplashAd alloc] initWithFrame:self.view.bounds
                                                         appKey:@"YOUR_APP_KEY"
                                                    placementId:@"YOUR_PLACEMENT_ID"
                                                 viewController:self];
splashAd.delegate = self;
[self.view addSubview:splashAd];
```

{% endtab %}
{% endtabs %}

## 전체 화면 모드 설정

{% tabs %}
{% tab title="Swift" %}

```swift
splashAd.setFullScreenSplash(true)        // false (default)
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
[splashAd setFullScreenSplash:YES];        // NO (default)
```

{% endtab %}
{% endtabs %}

## 스플래시 광고 요청

{% tabs %}
{% tab title="Swift" %}

```swift
splashAd.loadRequest()
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
[splashAd loadRequest];
```

{% endtab %}
{% endtabs %}

## 스플래시 광고 중단

{% tabs %}
{% tab title="Swift" %}

```swift
splashAd.stopAd()
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
[splashAd stopAd];
```

{% endtab %}
{% endtabs %}

## 이벤트 리스너

| 이벤트 리스너                    | 설명            |
| -------------------------- | ------------- |
| `apsspSplashAdLoadSuccess` | 스플래시 광고 로딩 성공 |
| `apsspSplashAdLoadFail`    | 스플래시 광고 로딩 실패 |
| `apsspSplashAdImpression`  | 스플래시 광고 노출    |

{% tabs %}
{% tab title="Swift" %}

```swift
extension ViewController: APSSPSplashAdDelegate {

    func apsspSplashAdLoadSuccess(_ splashAd: APSSPSplashAd) {
    }

    func apsspSplashAdLoadFail(_ splashAd: APSSPSplashAd, error: APSSPNetworkError) {
    }

    func apsspSplashAdImpression(_ splashAd: APSSPSplashAd) {
    }
}
```

{% endtab %}

{% tab title="Objective-C" %}

```objc
- (void)apsspSplashAdLoadSuccess:(APSSPSplashAd *)splashAd {
}

- (void)apsspSplashAdLoadFail:(APSSPSplashAd *)splashAd error:(enum APSSPNetworkError)error {
}

- (void)apsspSplashAdImpression:(APSSPSplashAd *)splashAd {
}
```

{% endtab %}
{% endtabs %}
