ContentMode

class ContentMode

An object representing the content mode of a view. It defines how a view’s content fills the available space. This object can take on the following values: center, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, resize, resizeAspect, and resizeAspectFill.

  • A string representation of the value of the content mode.

    Declaration

    var name: String { get }
  • A vertically inverted version of the original content mode value.

    Declaration

    var flipped: ContentMode { get }
  • The list of all possible ContentMode values.

    Declaration

    var allValues: Array { get }
  • The object’s description

    Declaration

    var description: String { get }
  • Compares two values for equality.

    The equals function is invoked using infix notation as in the following code snippet: lhs == rhs.

    Declaration

    func equals(_ lhs: ContentMode) -> Bool

    Parameters

    lhs

    A value.

    rhs

    Another value.

    Return Value

    true if the lhs and rhs are equal, false otherwise.