RespondableField
public protocol RespondableField
Abstract protocol that give you ability to control under responder chain for text fields.
-
Next responder, next field which will be activated with
nextbutton on keyboard or toolbar.You can setup any UIResponder object and it will be activated when user tap on
nextkeyboard button.Important
- When you setup non-nill object - your
returnKeyTypewill set with.nextvalue. - If you provide nill object -
returnKeyTypewill set with.defaultvalue. - This rules doesn’t apply into the TextView.
- This property will be used separatly for your needs, but also it can be used with picker views from library (which have custom toolbar view with next/previous arrow buttons).
Declaration
Swift
var nextInput: UIResponder? { get set } - When you setup non-nill object - your
-
Previous responder, previous field which will be activated with
previousbutton on custom tollbar view from this library.Originally, this property is useless, because default keyboard doesn’t have any button for switching on previous field. But you can use this property for your custom toolbar or predefined toolbar from this library.
Declaration
Swift
var previousInput: UIResponder? { get set } -
Returns a Boolean value indicating whether this object is the first responder.
Declaration
Swift
var isFirstResponder: Bool { get } -
Returns a Boolean value indicating whether this object can become the first responder.
Declaration
Swift
var canBecomeFirstResponder: Bool { get } -
Asks UIKit to make this object the first responder in its window.
Declaration
Swift
func becomeFirstResponder() -> Bool
RespondableField Protocol Reference