Collapsable
public protocol Collapsable
Represents a collapsable element.
-
Collapse self.
Declaration
Swift
func collapse(animated: Bool, animationDuration: TimeInterval)Parameters
animatedIndicates if the collapse should be animated.
animationDurationThe animationDuration of the collapse.
-
Uncollapse self.
Declaration
Swift
func uncollapse(animated: Bool, animationDuration: TimeInterval)Parameters
animatedIndicates if the collapse should be animated.
animationDurationThe animationDuration of the collapse.
-
collapse(animated:Default implementationanimationDuration: ) Default Implementation
Collapse a view by adding/modifying constraint height. It works also if they view already has a constraint.
Warning
It is intended to be used to collapse a view without subviews.
Declaration
Swift
public func collapse(animated: Bool = true, animationDuration: TimeInterval = 1)Parameters
viewThe view to collapse
animatedIndicates if the collapse should be animated.
animationDurationThe animationDuration of the collapse.
-
uncollapse(animated:Default implementationanimationDuration: ) Default Implementation
Uncollapse a view by removing/modifying constraint height. It works also if they view already has a constraint.
Warning: It is intended to be used to uncollapse a view without subviews.
Declaration
Swift
public func uncollapse(animated: Bool = true, animationDuration: TimeInterval = 1)Parameters
viewThe view to collapse
animatedIndicates if the collapse should be animated.
animationDurationThe animationDuration of the collapse.
Collapsable Protocol Reference