AATStickyBannerPlacement
@objc public protocol AATStickyBannerPlacement {
/// Set the placement delegate that will listen to ad loading and display events
var delegate: AATStickyBannerPlacementDelegate? { get set }
/// Set the placement statistics delegate
var statisticsDelegate: AATStatisticsDelegate? { get set }
/// Set the placement impression delegate
var impressionDelegate: AATImpressionDelegate? { get set }
/// Sets the placement collapsible banner options
var collapsableBannerOptions: AATCollapsibleBannerOptions? { get set }
/// Start the automatic reloading of the placement
func startAutoReload()
/// Start the automatic reloading of the placement using specific time interval
func startAutoReload(seconds: TimeInterval)
/// Stop the automatic reloading of the placement
func stopAutoReload()
/// Set the placement auto reload interval
/// - Parameter seconds: auto reload interval
func setAutoreloadInterval(seconds: TimeInterval)
/// Requests placement reload.
///
/// Works only if automatic reloading is disabled.
///
/// - Parameter forceLoad: True if you want to be able to reload and show new banner before set banner reload interval (default: 30s) between reloads, false otherwise.
/// - Returns: Bool if reload started and false otherwise.
func reload(forceLoad: Bool) -> Bool
/// Requests placement reload.
///
/// Works only if automatic reloading is disabled.
///
/// - Returns: Bool if reload started and false otherwise.
func reload() -> Bool
/// Returns true if there is an ad loaded for given placement.
/// - Returns: True if there is an ad loaded for given placement.
func hasAd() -> Bool
/// Returns placement view. Works only for banner placements.
/// - Returns: Placement view
func getPlacementView() -> UIView?
/// Sets placement default image. This image will be shown in placement when no ad is available.
/// - Parameter image: The image to set.
func setDefaultImage(image: UIImage)
/// Sets gravity for ads that don't fill entire placement area. Works only for sticky banner placements.
///
/// - Parameter alignment: The alignment to set.
func setBannerAlign(alignment: AATBannerAlign)
/// Sets the targeting information for the placement
///
/// Information provided for placement overrides targeting information overrides targeting information for application set by the ``AATSDK/setTargetingInfo(info:)``
var targetingInfo: [String : [String]]? { get set }
/// Sets the content targeting url for the placement.
///
/// Information provided for placement overrides targeting information for application set by the ``AATSDK/setContentTargetingUrl(targetingUrl:)``
var contentTargetingUrl: String? { get set }
/// Enable saving creative history
/// - Parameter size: The max size of the history to be saved
func enableCreativeHistory(size: Int)
/// Get the saved creative history
/// - Parameter completion: Completion block with the creative history
func getCreativeHistory(completion: @escaping ([AATPlacementHistoryInfo]) -> Void)
}
@protocol AATStickyBannerPlacement <AATPlacement>
/// Set the placement delegate that will listen to ad loading and display events
@property (nonatomic, strong) id <AATStickyBannerPlacementDelegate> _Nullable delegate;
/// Sets the placement statistics delegate
@property (nonatomic, strong) id <AATStatisticsDelegate> _Nullable statisticsDelegate;
/// Sets the placement impression delegate
@property (nonatomic, strong) id <AATImpressionDelegate> _Nullable impressionDelegate;
/// Sets the placement collapsible banner options
@property (nonatomic, strong) AATCollapsibleBannerOptions * _Nullable collapsableBannerOptions;
/// Start the automatic reloading of the placement
- (void)startAutoReload;
/// Start the automatic reloading of the placement using specific time interval
- (void)startAutoReloadWithSeconds:(NSTimeInterval)seconds;
/// Stop the automatic reloading of the placement
- (void)stopAutoReload;
/// Set the placement auto reload interval
/// \param seconds auto reload interval
///
- (void)setAutoreloadIntervalWithSeconds:(NSTimeInterval)seconds;
/// Requests placement reload.
/// Works only if automatic reloading is disabled.
/// \param forceLoad True if you want to be able to reload and show new banner before set banner reload interval (default: 30s) between reloads, false otherwise.
///
///
/// returns:
/// Bool if reload started and false otherwise.
- (BOOL)reloadWithForceLoad:(BOOL)forceLoad;
/// Requests placement reload.
/// Works only if automatic reloading is disabled.
///
/// returns:
/// Bool if reload started and false otherwise.
- (BOOL)reload;
/// Returns true if there is an ad loaded for given placement.
///
/// returns:
/// True if there is an ad loaded for given placement.
- (BOOL)hasAd;
/// Returns placement view. Works only for banner placements.
///
/// returns:
/// Placement view
- (UIView * _Nullable)getPlacementView;
/// Sets placement default image. This image will be shown in placement when no ad is available.
/// \param image The image to set.
///
- (void)setDefaultImageWithImage:(UIImage * _Nonnull)image;
/// Sets gravity for ads that don’t fill entire placement area. Works only for sticky banner placements.
/// \param alignment The alignment to set.
///
- (void)setBannerAlignWithAlignment:(AATBannerAlign * _Nonnull)alignment;
/// Sets the targeting information for the placement
/// Information provided for placement overrides targeting information overrides targeting information for application set by the <code>AATSDK/setTargetingInfo(info:)</code>
@property (nonatomic, copy) NSDictionary<NSString *, NSArray<NSString *> *> * _Nullable targetingInfo;
/// Sets the content targeting url for the placement.
/// Information provided for placement overrides targeting information for application set by the <code>AATSDK/setContentTargetingUrl(targetingUrl:)</code>
@property (nonatomic, copy) NSString * _Nullable contentTargetingUrl;
/// Enable saving creative history
/// \param size The max size of the history to be saved
///
- (void)enableCreativeHistoryWithSize:(NSInteger)size;
/// Get the saved creative history
/// \param completion Completion block with the creative history
///
- (void)getCreativeHistoryWithCompletion:(void (^ _Nonnull)(NSArray<AATPlacementHistoryInfo *> * _Nonnull))completion;
@end
Last updated