ElementConfig

public class ElementConfig

Holds basic element configuration values.

  • Type of the element. Default value is .Unknown.

    Declaration

    Swift

    public let type: ElementType
  • Identifier of the element.

    • Special identifiers are:
      • Labels
      • title
      • currentTime
      • remainingTime
      • duration
      • Buttons
      • close
      • action
      • Toggle Buttons
      • play
      • Sliders
      • playback

    Declaration

    Swift

    public let identifier: String?
  • How the width of the element will be calculated. Default value is .Fill for title label and playback slider, .Fit for other labels, and .AsDefined for the rest.

    Declaration

    Swift

    public let widthCalculation: ElementWidthCalculation
  • Element width, effective only if widthCalculation is set to .AsDefined. Default value is 40.

    Declaration

    Swift

    public let width: CGFloat
  • The horizontal space to the left of this element that will be left empty. Default value is 0.

    Declaration

    Swift

    public let marginLeft: CGFloat
  • The horizontal space to the right of this element that will be left empty. Default value is 0.

    Declaration

    Swift

    public let marginRight: CGFloat
  • Initializes using default values.

    Declaration

    Swift

    public convenience init()
  • Initializes using a dictionary.

    • Key for type is "type" and its value should be a raw ElementType enum value.
    • Key for identifier is "identifier" and its value should be a string.
    • Key for widthCalculation is "widthCalculation" and its value should be a raw ElementWidthCalculation enum value.
    • Key for width is "width" and its value should be a number.
    • Key for marginLeft is "marginLeft" and its value should be a number.
    • Key for marginRight is "marginRight" and its value should be a number.

    • parameters:

      • dictionary: Element configuration dictionary.

    Declaration

    Swift

    public init(dictionary: [String: AnyObject])

    Parameters

    dictionary

    Element configuration dictionary.