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) -
changingHeightAnimationDefault implementationUndocumented
Default Implementation
Closure based replacement for header/footer for changingHeight
Declaration
Swift
var changingHeightAnimation: AnimatingEvent? { get } -
contentConstraintsDefault implementationUndocumented
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.
availableWidthcan 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
alphaback to 1Declaration
Swift
func didChangeHeight(with update: PageHeightUpdate) -
didChangeHeightAnimationDefault implementationUndocumented
Default Implementation
Closure based replacement for header/footer for didChangeHeight
Declaration
Swift
var didChangeHeightAnimation: AnimatingEvent? { get } -
fadeOnPageChangeDefault implementationBy default, all
ConstrainedContentfades on page change, returning false from this value will change that.Default Implementation
By default, all
ConstrainedContentfades on page change, returning false from this value will change that.Declaration
Swift
var fadeOnPageChange: Bool { get } -
idDefault implementationUndocumented
Default Implementation
The name and address of the content view instance
Declaration
Swift
var id: String { get } -
isPaysheetRowDefault implementationUndocumented
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
alphato 0 if the height of the ContentView is changing (when isVisible is toggled).Declaration
Swift
func willChangeHeight(with update: PageHeightUpdate) -
willChangeHeightAnimationDefault implementationUndocumented
Default Implementation
Closure based replacement for header/footer for willChangeHeight
Declaration
Swift
var willChangeHeightAnimation: AnimatingEvent? { get } -
AnimatingEventExtension methodUndocumented
Declaration
Swift
typealias AnimatingEvent = (HeightChange, Bool, TimeInterval) -> Void
-
contentViewDefault implementationDefault Implementation
In
UIView: ContentViewcases, return itself when queried for.contentViewDeclaration
Swift
var contentView: UIView { get } -
desiredHeightDefault implementationDefault Implementation
Default for
desiredHeightis set to 0 and passed intodesiredHeight(forWidth:)so that Venmo can continue implementing custom heights within their app until it is updated with the new implementationDeclaration
Swift
var desiredHeight: CGFloat { get } -
isVisibleDefault implementationDefault Implementation
Default to the opposite of isHidden unless explicitly changed
Declaration
Swift
var isVisible: Bool { get } -
visibilityDidChangeExtension methodEvaluating this property in
willChangeHeight()in will help determine whether the cell containing thisContentViewis about to change height (isVisiblewas changed)Declaration
Swift
var visibilityDidChange: Bool { get }
-
contentViewDefault implementationDefault Implementation
In
UIViewController: ContentViewcases, return the internal.viewUIViewDeclaration
Swift
var contentView: UIView { get } -
isVisibleDefault implementationDefault Implementation
Default to the opposite of isHidden unless explicitly changed
Declaration
Swift
var isVisible: Bool { get }
View on GitHub
Install in Dash
ContentView Protocol Reference