Skip to content

Commit 9b300e6

Browse files
hide / show adView relative to onSlotStartHide / onSlotStartShow WKScriptMessage events
1 parent c7528c9 commit 9b300e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

TeadsSampleApp/WebViewHelper/TeadsWebViewHelper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,13 @@ import WebKit
259259
case .onTeadsJsLibReady:
260260
insertSlot()
261261
case .onSlotStartShow:
262+
adView?.isHidden = false
262263
// the bootstrap calls this when the slot starts to show
263264
delegate?.webViewHelperSlotStartToShow()
264265
case .onSlotUpdated:
265266
onSlotUpdated(position: message.body as? String)
266267
case .onSlotStartHide:
268+
adView?.isHidden = true
267269
// the bootstrap calls this when the slot starts to hide
268270
delegate?.webViewHelperSlotStartToHide()
269271
case .handleError:

0 commit comments

Comments
 (0)