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 implementationUndocumented
Default Implementation
Closure based replacement for header/footer for changingHeight
Declaration
Swift
var changingHeightAnimation: AnimatingEvent? { get }
-
contentConstraints
Default 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.
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 1Declaration
Swift
func didChangeHeight(with update: PageHeightUpdate)
-
didChangeHeightAnimation
Default implementationUndocumented
Default Implementation
Closure based replacement for header/footer for didChangeHeight
Declaration
Swift
var didChangeHeightAnimation: AnimatingEvent? { get }
-
fadeOnPageChange
Default implementationBy 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 implementationUndocumented
Default Implementation
The name and address of the content view instance
Declaration
Swift
var id: String { get }
-
isPaysheetRow
Default 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
alpha
to 0 if the height of the ContentView is changing (when isVisible is toggled).Declaration
Swift
func willChangeHeight(with update: PageHeightUpdate)
-
willChangeHeightAnimation
Default implementationUndocumented
Default Implementation
Closure based replacement for header/footer for willChangeHeight
Declaration
Swift
var willChangeHeightAnimation: AnimatingEvent? { get }
-
AnimatingEvent
Extension methodUndocumented
Declaration
Swift
typealias AnimatingEvent = (HeightChange, Bool, TimeInterval) -> Void
-
contentView
Default implementationDefault Implementation
In
UIView: ContentView
cases, return itself when queried for.contentView
Declaration
Swift
var contentView: UIView { get }
-
desiredHeight
Default implementationDefault Implementation
Default for
desiredHeight
is 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 }
-
isVisible
Default implementationDefault Implementation
Default to the opposite of isHidden unless explicitly changed
Declaration
Swift
var isVisible: Bool { get }
-
visibilityDidChange
Extension methodEvaluating this property in
willChangeHeight()
in will help determine whether the cell containing thisContentView
is about to change height (isVisible
was changed)Declaration
Swift
var visibilityDidChange: Bool { get }
-
contentView
Default implementationDefault Implementation
In
UIViewController: ContentView
cases, return the internal.view
UIView
Declaration
Swift
var contentView: UIView { get }
-
isVisible
Default implementationDefault Implementation
Default to the opposite of isHidden unless explicitly changed
Declaration
Swift
var isVisible: Bool { get }