CreationKit Documentation

Class Placeholder​Text​Field

public class PlaceholderTextField: UITextField, TextInputable  

A UITextField that updates it self to display as a placeholder when it's text property is nil.

PlaceholderTextField PlaceholderTextField TextInputable TextInputable PlaceholderTextField->TextInputable UITextField UITextField PlaceholderTextField->UITextField

Conforms To

TextInputable

A protocol that is used by InputField to manage the text and placeholder of an input field.

UITextField

Initializers

init(text:​placeholder:​)

public convenience init(
    text: String? = nil, placeholder: String)  

Properties

placeholder

public override var placeholder: String!  

view​Naturally​Supports​Right​Accessory​View

public let viewNaturallySupportsRightAccessoryView: Bool = true

right​Accessory​View​Size

public var rightAccessoryViewSize: CGSize = .zero

The size of the right accessory view.

right​Accessory​View

public var rightAccessoryView: UIView?  

The overlay view that displays on the right (or trailing) side of the text field.

read​Only

@Published public var readOnly: Bool = false

Methods

text​Rect(for​Bounds:​)

public override func textRect(forBounds bounds: CGRect) -> CGRect  

placeholder​Rect(for​Bounds:​)

public override func placeholderRect(forBounds bounds: CGRect) -> CGRect  

editing​Rect(for​Bounds:​)

public override func editingRect(forBounds bounds: CGRect) -> CGRect  

right​View​Rect(for​Bounds:​)

public override func rightViewRect(forBounds bounds: CGRect) -> CGRect