类型 函数 返回值 无 修订 版本 2024.3703 关键词 广告, Appodeal, 隐藏 另请参阅 appodeal.show() appodeal.*
隐藏当前显示的 Appodeal 横幅广告。不适用于插页式广告或视频广告。
appodeal.hide( adUnitType )
字符串. 要隐藏的广告类型。该值应始终设置为 "banner"
。
local appodeal = require( "plugin.appodeal" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Show a banner ad appodeal.show( "banner", { yAlign="top" } ) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) end end -- Initialize the Appodeal plugin appodeal.init( adListener, { appKey="YOUR_APP_KEY" } ) -- Sometime later, hide the ad appodeal.hide( "banner" )