Class
PlaceholderTextField
public class PlaceholderTextField: UITextField, TextInputable
A UITextField that updates it self to display as a placeholder when it's text property is nil.
Relationships
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!
viewNaturallySupportsRightAccessoryView
public let viewNaturallySupportsRightAccessoryView: Bool = true
rightAccessoryViewSize
public var rightAccessoryViewSize: CGSize = .zero
The size of the right accessory view.
rightAccessoryView
public var rightAccessoryView: UIView?
The overlay view that displays on the right (or trailing) side of the text field.
readOnly
@Published public var readOnly: Bool = false
Methods
textRect(forBounds:)
public override func textRect(forBounds bounds: CGRect) -> CGRect
placeholderRect(forBounds:)
public override func placeholderRect(forBounds bounds: CGRect) -> CGRect
editingRect(forBounds:)
public override func editingRect(forBounds bounds: CGRect) -> CGRect
rightViewRect(forBounds:)
public override func rightViewRect(forBounds bounds: CGRect) -> CGRect