SCAdControllerDelegate

@protocol SCAdControllerDelegate <NSObject>

Delegate functions that need to be implemented to use this class correctly

  • return the size of the player

    Declaration

    Objective-C

    - (id)playerSize;
  • return the size of the viewport

    Declaration

    Objective-C

    - (id)viewportSize;
  • called when an alert should be displayed by the view controller

    Declaration

    Objective-C

    - (void)displayAlert:(id)alert;
  • called when the adSlot has started

    Declaration

    Objective-C

    - (void)adSlotStarted;
  • called when the adSlot has completed

    Declaration

    Objective-C

    - (void)adSlotCompleted;
  • called when the skip button should be displayed or hidden

    Declaration

    Objective-C

    - (void)hideSkipButton:(BOOL)hide;
  • called to set the correct state of the mute button (muted or not muted)

    Declaration

    Objective-C

    - (void)displayMuted:(BOOL)muted;
  • called with values to customize you ui (text, textcolor and progressbar color)

    Declaration

    Objective-C

    - (void)configureDisplayWith:
        (nonnull SCAdViewConfiguration *)adViewConfiguration;
  • called when the progressBar should be displayed or hidden

    Declaration

    Objective-C

    - (void)displayProgress:(BOOL)display;
  • called with the current progress value to be displayed by the progressBar

    Declaration

    Objective-C

    - (void)updateProgress:(id)progress;
  • give back the current view mode (ViewModeNormal or ViewModeFullscreen)

    Declaration

    Objective-C

    - (ViewMode)currentViewMode;
  • called when allover playback has finished (Sequencer)

    Declaration

    Objective-C

    - (void)playbackFinished;
  • called to signal if a fullscreen mode should be exited after playback of the current ad

    Declaration

    Objective-C

    - (void)exitFullscreenAfterPlayback:(BOOL)exit;
  • called for every happening SCAdEvent, can be used to add customized code for certain events

    Declaration

    Objective-C

    - (void)onEventCallbackWith:(nonnull SCAdEvent *)event;
  • if you have set customizableClickThroughAlert to true in the configuration you must implement this callback function and display the clickThroughAlert by yourself when this callback is called

    Declaration

    Objective-C

    - (void)displayClickThroughAlert;