ResponsiveTextField Documentation

Structure Standard​Edit​Action​Handling

public struct StandardEditActionHandling<Responder: UIResponder>  

A protocol-witness style implementation of the UIResponderStandardEditActions protocol that can be used to override the default behaviour of UITextField.

All of the functions return a Bool. Returning false to prevent the default behaviour.

Nested Type Aliases

Standard​Edit​Action​Handler

public typealias StandardEditActionHandler = (Responder, Any?) -> Bool

A closure that can be used to customise a standard edit action.

  • Responder - the control that this action is associated with, e.g. the UITextField

  • Any? - the sender of the action.

Conversion​Handler

public typealias ConversionHandler = ([NSAttributedString.Key : Any]) -> [NSAttributedString.Key : Any] 

Initializers

init(cut:​copy:​paste:​delete:​select:​select​All:​toggle​Boldface:​toggle​Italics:​toggle​Underline:​make​Text​Writing​Direction​Left​ToRight:​make​Text​Writing​Direction​Right​ToLeft:​increase​Size:​decrease​Size:​update​Text​Attributes:​)

public init(
        cut: StandardEditActionHandler? = nil,
        copy: StandardEditActionHandler? = nil,
        paste: StandardEditActionHandler? = nil,
        delete: StandardEditActionHandler? = nil,
        select: StandardEditActionHandler? = nil,
        selectAll: StandardEditActionHandler? = nil,
        toggleBoldface: StandardEditActionHandler? = nil,
        toggleItalics: StandardEditActionHandler? = nil,
        toggleUnderline: StandardEditActionHandler? = nil,
        makeTextWritingDirectionLeftToRight: StandardEditActionHandler? = nil,
        makeTextWritingDirectionRightToLeft: StandardEditActionHandler? = nil,
        increaseSize: StandardEditActionHandler? = nil,
        decreaseSize: StandardEditActionHandler? = nil,
        updateTextAttributes: ((Responder, ConversionHandler) -> Bool)? = nil
    )  

Properties

cut

public var cut: StandardEditActionHandler? 

copy

public var copy: StandardEditActionHandler? 

paste

public var paste: StandardEditActionHandler? 

delete

public var delete: StandardEditActionHandler? 

select

public var select: StandardEditActionHandler? 

select​All

public var selectAll: StandardEditActionHandler? 

toggle​Boldface

public var toggleBoldface: StandardEditActionHandler? 

toggle​Italics

public var toggleItalics: StandardEditActionHandler? 

toggle​Underline

public var toggleUnderline: StandardEditActionHandler? 

make​Text​Writing​Direction​Left​ToRight

public var makeTextWritingDirectionLeftToRight: StandardEditActionHandler? 

make​Text​Writing​Direction​Right​ToLeft

public var makeTextWritingDirectionRightToLeft: StandardEditActionHandler? 

increase​Size

public var increaseSize: StandardEditActionHandler? 

decrease​Size

public var decreaseSize: StandardEditActionHandler? 

update​Text​Attributes

public var updateTextAttributes: ((Responder, ConversionHandler) -> Bool)?