TTextView
open class TTextView : UIScrollView
A scrollable, multiline text region.
-
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.
-
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 }
-
The custom distance that the content view is inset from the safe area or scroll view edges.
Declaration
Swift
open override var contentInset: UIEdgeInsets { get set }
-
Lays out subviews.
Declaration
Swift
open override func layoutSubviews()
-
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 composed frame being displayed.
Declaration
Swift
open var textFrame: ComposedFrame? { get }
-
The text alignment to apply on each line. Its default value is
.leading
.Declaration
Swift
open var textAlignment: TextAlignment { 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 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 }
-
A boolean value that indicates whether or not to justify the text lines. Its default value is
false
.Declaration
Swift
open var isJustificationEnabled: Bool { get set }
-
The justification level which can range from
0.0
to1.0
. A lower value increases the tightness between words while a higher value decreases it. Its default value is1.0
.Declaration
Swift
open var justificationLevel: 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 }
-
The color to display a separator line below each rendered text line. Its default value is
nil
.Declaration
Swift
open var separatorColor: UIColor? { get set }