TLabel
open class TLabel : UIView
A view that displays read-only text to the user.
-
Undocumented
Declaration
Swift
private(set) open var textFrame: ComposedFrame? { get }
-
Returns an object initialized from data in a given unarchiver.
Declaration
Swift
public required init?(coder: NSCoder)
Parameters
coder
An unarchiver object.
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
public override init(frame: CGRect)
Parameters
frame
The frame rectangle for the view, measured in points.
-
A Boolean value that indicates whether the view depends on the constraint-based layout system.
Declaration
Swift
open override class var requiresConstraintBasedLayout: Bool { get }
-
Lays out subviews.
Declaration
Swift
open override func layoutSubviews()
-
The frame rectangle, which describes the view’s location and size in its superview’s coordinate system.
Declaration
Swift
open override var frame: CGRect { get set }
-
The bounds rectangle, which describes the view’s location and size in its own coordinate system.
Declaration
Swift
open override var bounds: CGRect { get set }
-
Draws the receiver’s image within the passed-in rectangle.
Declaration
Swift
open override func draw(_ rect: CGRect)
Parameters
rect
The portion of the view’s bounds that needs to be updated.
-
Returns the UTF-16 index representing the specified position, or
nil
if there is no character at this position.Declaration
Swift
open func indexOfCodeUnit(at position: CGPoint) -> Int?
Parameters
position
The position for which to determine the UTF-16 index.
-
Returns the index of character representing the specified position, or
nil
if there is no character at this position.Declaration
Swift
open func indexOfCharacter(at position: CGPoint) -> String.Index?
Parameters
position
The position for which to determine the character index.
-
The text alignment to apply on each line. Its default value is
.leading
.Declaration
Swift
open var textAlignment: TextAlignment { get set }
-
The vertical alignment to apply on the contents. Its default value is
.top
.Declaration
Swift
open var verticalAlignment: VerticalAlignment { get set }
-
The typesetter that is used to compose text lines.
Setting this property will make
text
andattributedText
propertiesnil
.A typesetter is preferred over
attributedText
as it avoids an extra step of creating the typesetter from theattributedText
.Declaration
Swift
open var typesetter: Typesetter? { get set }
-
The current styled text that is displayed by the label.
This property will be
nil
if eithertext
ortypesetter
is being used instead. Setting this property will maketext
propertynil
.If performance is required, a typesetter should be used directly.
Declaration
Swift
open var attributedText: NSAttributedString! { get set }
-
The typeface in which the text is displayed.
Declaration
Swift
open var typeface: Typeface? { get set }
-
The current text that is displayed by the label.
This property will be
nil
if eitherattributedText
ortypesetter
is being used instead. Setting this property will maketext
propertynil
.If performance is required, a typesetter should be used directly.
Declaration
Swift
open var text: String! { get set }
-
The default size of the text.
Declaration
Swift
open var textSize: CGFloat { get set }
-
The default color of the text.
Declaration
Swift
open var textColor: UIColor { get set }
-
The truncation mode that should be used on the last line of the text in case of overflow.
Declaration
Swift
open var truncationMode: BreakMode { get set }
-
The truncation place for the last line of the text. The truncation is disabled if its value is
.nil
Declaration
Swift
open var truncationPlace: TruncationPlace? { get set }
-
The maximum number of lines to use for rendering text.
Declaration
Swift
open var maxLines: Int? { get set }
-
The extra spacing that is added after each text line. It is resolved before line height multiplier. Its default value is zero.
Declaration
Swift
open var extraLineSpacing: CGFloat { get set }
-
The height multiplier that is applied on each text line. It is resolved after extra line spacing. Its default value is one.
The additional spacing is adjusted in such a way that text remains in the middle of the line.
Declaration
Swift
open var lineHeightMultiplier: CGFloat { get set }
-
The rendering style, used for controlling how text should appear while drawing. Its default value is
.fill
.Declaration
Swift
open var renderingStyle: Renderer.RenderingStyle { get set }
-
The stroke color for text. Its default value is
black
.Declaration
Swift
open var strokeColor: UIColor { get set }
-
The stroke width for text.
Declaration
Swift
open var strokeWidth: CGFloat { get set }
-
The stroke cap style which controls how the start and end of stroked lines and paths are treated. Its default value is
.butt
.Declaration
Swift
open var strokeCap: Renderer.StrokeCap { get set }
-
The stroke join type. Its default value is
.round
.Declaration
Swift
open var strokeJoin: Renderer.StrokeJoin { get set }
-
The stroke miter limit in pixels. This is used to control the behavior of miter joins when the joins angle is sharp.
Declaration
Swift
open var strokeMiter: CGFloat { get set }