Sticky Banner

Integrate sticky banners

Create placement

Placement will be created automatically when adding AATKitBanner widget to the UI, for example:

return Scaffold(
    appBar: AppBar(
      title: Text(HomePage.title),
    ),
    body: Center(
      child: AATKitBanner(),
    ),
);

You can change the placement name if needed:

NativeBannerView.kt
    //Change banner placement name if needed
    private val placementName = "BannerPlacement"
AATKitNativeBannerView.swift
    //Change banner placement name if needed
    private let placementName = "BannerPlacement"

Set collapsible options if needed:

NativeBannerView.kt
    //Set collapsibleBannerOptions if needed
    stickyBannerPlacement?.collapsibleBannerOptions = CollapsibleBannerOptions(CollapsibleBannerOptions.CollapsiblePosition.BOTTOM, 10)
AATKitNativeBannerView.swift
    //Set collapsibleBannerOptions if needed
    bannerPlacement?.collapsableBannerOptions = AATCollapsibleBannerOptions(position: .bottom, minDelay: 10)

Reload placement

When AATKitBanner widget is initialized, AATKit will start auto-reloading the ads. To stop banner ads auto-reload, simply remove widget from the UI.

Last updated