ContentView

protocol ContentView : AnyObject, StaticIdentifiable

Undocumented

  • changingHeight(with:) Default implementation

    Undocumented

    Default Implementation

    Method that’s part of an animation sequence for before, during, and after the paysheet changing height. The default behavior is nothing.

    Declaration

    Swift

    func changingHeight(with update: PageHeightUpdate)
  • changingHeightAnimation Default implementation

    Undocumented

    Default Implementation

    Closure based replacement for header/footer for changingHeight

    Declaration

    Swift

    var changingHeightAnimation: AnimatingEvent? { get }
  • contentConstraints Default implementation

    Undocumented

    Default Implementation

    AlignableImageView content constraints will update based on the set ImageAlignment.

    Declaration

    Swift

    var contentConstraints: ContentConstrainer { get }
  • Undocumented

    Declaration

    Swift

    var contentView: UIView { get }
  • Undocumented

    Declaration

    Swift

    @available(*, deprecated, message: "`desiredHeight` is replaced by `desiredHeight(forWidth:﹚`")
    var desiredHeight: CGFloat { get }
  • desiredHeight(forWidth:) Default implementation

    Undocumented

    Default Implementation

    This method allows input for a specific width that views use within their layouts so that the widths aren’t assumed and returns the desired height based on a specific width. availableWidth can be used by the view itself, too.

    Declaration

    Swift

    func desiredHeight(forWidth availableWidth: CGFloat) -> CGFloat
  • didChangeHeight(with:) Default implementation

    Undocumented

    Default Implementation

    Default implementation that will animate the alpha back to 1

    Declaration

    Swift

    func didChangeHeight(with update: PageHeightUpdate)
  • didChangeHeightAnimation Default implementation

    Undocumented

    Default Implementation

    Closure based replacement for header/footer for didChangeHeight

    Declaration

    Swift

    var didChangeHeightAnimation: AnimatingEvent? { get }
  • fadeOnPageChange Default implementation

    By default, all ConstrainedContent fades on page change, returning false from this value will change that.

    Default Implementation

    By default, all ConstrainedContent fades on page change, returning false from this value will change that.

    Declaration

    Swift

    var fadeOnPageChange: Bool { get }
  • id Default implementation

    Undocumented

    Default Implementation

    The name and address of the content view instance

    Declaration

    Swift

    var id: String { get }
  • isPaysheetRow Default implementation

    Undocumented

    Default Implementation

    By default all content views will be set as non-paysheet rows

    Declaration

    Swift

    var isPaysheetRow: Bool { get }
  • Undocumented

    Declaration

    Swift

    var isVisible: Bool { get }
  • willChangeHeight(with:) Default implementation

    Undocumented

    Default Implementation

    Default implementation that will animate the alpha to 0 if the height of the ContentView is changing (when isVisible is toggled).

    Declaration

    Swift

    func willChangeHeight(with update: PageHeightUpdate)
  • willChangeHeightAnimation Default implementation

    Undocumented

    Default Implementation

    Closure based replacement for header/footer for willChangeHeight

    Declaration

    Swift

    var willChangeHeightAnimation: AnimatingEvent? { get }
  • AnimatingEvent Extension method

    Undocumented

    Declaration

    Swift

    typealias AnimatingEvent = (HeightChange, Bool, TimeInterval) -> Void

Available where Self : UIView

  • contentView Default implementation

    Default Implementation

    In UIView: ContentView cases, return itself when queried for .contentView

    Declaration

    Swift

    var contentView: UIView { get }
  • desiredHeight Default implementation

    Default Implementation

    Default for desiredHeight is set to 0 and passed into desiredHeight(forWidth:) so that Venmo can continue implementing custom heights within their app until it is updated with the new implementation

    Declaration

    Swift

    var desiredHeight: CGFloat { get }
  • isVisible Default implementation

    Default Implementation

    Default to the opposite of isHidden unless explicitly changed

    Declaration

    Swift

    var isVisible: Bool { get }
  • visibilityDidChange Extension method

    Evaluating this property in willChangeHeight() in will help determine whether the cell containing this ContentView is about to change height (isVisible was changed)

    Declaration

    Swift

    var visibilityDidChange: Bool { get }

Available where Self : UIViewController

  • contentView Default implementation

    Default Implementation

    In UIViewController: ContentView cases, return the internal .view UIView

    Declaration

    Swift

    var contentView: UIView { get }
  • isVisible Default implementation

    Default Implementation

    Default to the opposite of isHidden unless explicitly changed

    Declaration

    Swift

    var isVisible: Bool { get }