Label

open class Label : View

Undocumented

  • Whether to cache all labels’ text as a bitmap.

    This increases memory usage and reduces quality of text in scaled scenarios, but reduces CPU usage when rendering the same label.

    Declaration

    Swift

    public static var globallyCacheAsBitmap: Bool
  • Overrides the default Label.globallyCacheAsBitmap value with a specified boolean value. If nil, the global value is used, instead.

    Declaration

    Swift

    public var cacheAsBitmap: Bool? { get set }
  • The current default font to render text with. Custom fonts in attributedText override this property.

    Declaration

    Swift

    open var font: Font { get set }
  • Convenience for changing the current font’s size. Same as self.font.size, setting this property updates the font to be self.font = self.font.fontFace.font(withSize: newValue). Custom fonts in attributedText override this property.

    Declaration

    Swift

    open var fontSize: Float { get set }
  • Undocumented

    Declaration

    Swift

    open var text: String { get set }
  • Undocumented

    Declaration

    Swift

    open var attributedText: AttributedText { get set }
  • Undocumented

    Declaration

    Swift

    open var textColor: Color { get set }
  • Declaration

    Swift

    open override var bounds: UIRectangle { get set }
  • Declaration

    Swift

    open override var intrinsicSize: UISize? { get }
  • Undocumented

    Declaration

    Swift

    open var horizontalTextAlignment: HorizontalTextAlignment { get set }
  • Undocumented

    Declaration

    Swift

    open var verticalTextAlignment: VerticalTextAlignment { get set }
  • Undocumented

    Declaration

    Swift

    public init(textColor: Color, fontSize: Float = 12)
  • Undocumented

    Declaration

    Swift

    public init(textColor: Color, font: Font)
  • Declaration

    Swift

    open override func render(in renderer: Renderer, screenRegion: ClipRegionType)
  • Declaration

    Swift

    open override func layoutSizeFitting(size: UISize) -> UISize