Declarative UIKit for iOS apps
EXTENSION
UILabel
extension UILabel: DHDStringRepresentable
stringRepresentation
public var stringRepresentation: String
adjustableFontSize
var adjustableFontSize: UILabel
Set adjustsFontForContentSizeCategory
to true
alignedRight
var alignedRight: UILabel
Set text alignment to right
alignedLeft
var alignedLeft: UILabel
Set text alignment to left
multiline
var multiline: UILabel
set numberOfLines
to 0
font(_:)
@discardableResult func font(_ font: UIFont) -> Self
set the font of this label
textStyle(_:)
@discardableResult func textStyle(_ style: UIFont.TextStyle) -> Self
set the font of this label using text styles
textColor(_:)
@discardableResult func textColor(_ color: UIColor) -> Self
set the text color of this label
alignment(_:)
@discardableResult func alignment(_ alignment: NSTextAlignment) -> Self
set the text alignment of this label
lineSpacing(_:)
@discardableResult func lineSpacing(_ lineSpacing: CGFloat) -> Self
set the line spacing of this label
declaredWith(text:)
@discardableResult func declaredWith(text: String?) -> Self
set the text property of this label