ExpandableLabel
@MainActor
open class ExpandableLabel : UILabel
Undocumented
-
Undocumented
Declaration
Swift
public enum TextReplacementType -
The delegate of ExpandableLabel
Declaration
Swift
@MainActor weak open var delegate: ExpandableLabelDelegate? -
Set ‘true’ if the label should be collapsed or ‘false’ for expanded.
Declaration
Swift
@IBInspectable @MainActor open var collapsed: Bool { get set } -
Set ‘true’ if the label can be expanded or ‘false’ if not. The default value is ‘true’.
Declaration
Swift
@IBInspectable @MainActor open var shouldExpand: Bool -
Set ‘true’ if the label can be collapsed or ‘false’ if not. The default value is ‘false’.
Declaration
Swift
@IBInspectable @MainActor open var shouldCollapse: Bool -
Set the link name (and attributes) that is shown when collapsed. The default value is “More”. Cannot be nil.
Declaration
Swift
@objc @MainActor open var collapsedAttributedLink: NSAttributedString! { get set } -
Set the link name (and attributes) that is shown when expanded. The default value is “Less”. Can be nil.
Declaration
Swift
@objc @MainActor open var expandedAttributedLink: NSAttributedString? -
Set the ellipsis that appears just after the text and before the link. The default value is “…”. Can be nil.
Declaration
Swift
@objc @MainActor open var ellipsis: NSAttributedString? { get set } -
Set a view to animate changes of the label collapsed state with. If this value is nil, no animation occurs. Usually you assign the superview of this label or a UIScrollView in which this label sits. Also don’t forget to set the contentMode of this label to top to smoothly reveal the hidden lines. The default value is ‘nil’.
Declaration
Swift
@objc @MainActor open var animationView: UIView? -
Undocumented
Declaration
Swift
@MainActor open var textReplacementType: TextReplacementType -
Undocumented
Declaration
Swift
@MainActor open override var numberOfLines: NSInteger { get set } -
Undocumented
Declaration
Swift
@MainActor public required init?(coder aDecoder: NSCoder) -
Undocumented
Declaration
Swift
@MainActor public override init(frame: CGRect) -
Undocumented
Declaration
Swift
@MainActor public init() -
Undocumented
Declaration
Swift
@MainActor open override var text: String? { get set } -
Undocumented
Declaration
Swift
@MainActor open private(set) var expandedText: NSAttributedString? { get } -
Undocumented
Declaration
Swift
@MainActor open override var attributedText: NSAttributedString? { get set } -
Undocumented
Declaration
Swift
@MainActor open func setLessLinkWith(lessLink: String, attributes: [NSAttributedString.Key : AnyObject], position: NSTextAlignment?)
-
Undocumented
Declaration
Swift
@MainActor open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) -
Undocumented
Declaration
Swift
@MainActor open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) -
Undocumented
Declaration
Swift
@MainActor open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) -
Undocumented
Declaration
Swift
@MainActor open override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)
View on GitHub
ExpandableLabel Class Reference