JWAdInterfaceStyleBuilder

@objcMembers
public class JWAdInterfaceStyleBuilder : NSObject, JWBuilder

The builder for the JWAdInterfaceStyle.

Note

Currently, this styling only applies to JW Player’s VAST ad client.
  • Declaration

    Swift

    public typealias Output = JWAdInterfaceStyle
  • Builds a JWAdInterfaceStyle structure for use in ads.

    Throws

    throws An error if the style is not setup properly.

    Declaration

    Swift

    public func build() throws -> Output
  • The text to display in the countdown until the ad ends. The default value is “This ad will end in xx”.

    Note

    The string provided is displayed as a literal, and is not looked up in a localized string table.

    Declaration

    Swift

    @discardableResult
    public func countdownText(_ text: String) -> JWAdInterfaceStyleBuilder

    Parameters

    text

    The desired text. Optionally, insert ‘xx’ where the countdown should be displayed.

    Return Value

    The builder, so setters can be chained.

  • The text to display while skipping is disabled. The default value is “Skip ad in xx”.

    Note

    The string provided is displayed as a literal, and is not looked up in a localized string table.

    Declaration

    Swift

    @discardableResult
    public func skipDelayText(_ text: String) -> JWAdInterfaceStyleBuilder

    Parameters

    text

    The desired text. Optionally, insert ‘xx’ where the countdown to skipping enabled should be displayed.

    Return Value

    The builder, so setters can be chained.

  • The text to display on the skip button when the user can tap it to skip the ad. The default value is “Skip Ad”.

    Note

    The string provided is displayed as a literal, and is not looked up in a localized string table.

    Declaration

    Swift

    @discardableResult
    public func skipText(_ text: String) -> JWAdInterfaceStyleBuilder

    Parameters

    text

    The desired text.

    Return Value

    The builder, so setters can be chained.

  • The number of seconds to delay the ability to skip the ad. The default value is nil (skip button won’t be shown).

    Declaration

    Swift

    @discardableResult
    public func skipDelay(_ seconds: TimeInterval) -> JWAdInterfaceStyleBuilder

    Parameters

    seconds

    The number of seconds to delay the ability to skip.

    Return Value

    The builder, so setters can be chained.