InputBarButtonItem
open class InputBarButtonItem: UIButton
A InputItem that inherits from UIButton
Important Notes
- Intended to be used in an
InputStackView
-
The spacing properties of the InputBarButtonItem
- fixed: The spacing is fixed
- flexible: The spacing is flexible
- none: There is no spacing
Declaration
Swift
public enum Spacing
-
Undocumented
Declaration
Swift
public typealias InputBarButtonItemAction = ((InputBarButtonItem) -> Void)
-
A weak reference to the MessageInputBar that the InputBarButtonItem used in
Declaration
Swift
open weak var messageInputBar: MessageInputBar?
-
The spacing property of the InputBarButtonItem that determines the contentHuggingPriority and any additional space to the intrinsicContentSize
Declaration
Swift
open var spacing: Spacing = .none
-
Undocumented
Declaration
Swift
open override var intrinsicContentSize: CGSize
-
A reference to the stack view position that the InputBarButtonItem is held in
Declaration
Swift
open var parentStackViewPosition: InputStackView.Position?
-
The title for the UIControlState.normal
Declaration
Swift
open var title: String?
-
The image for the UIControlState.normal
Declaration
Swift
open var image: UIImage?
-
Calls the onSelectedAction or onDeselectedAction when set
Declaration
Swift
open override var isHighlighted: Bool
-
Calls the onEnabledAction or onDisabledAction when set
Declaration
Swift
open override var isEnabled: Bool
-
Undocumented
Declaration
Swift
public convenience init()
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Undocumented
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Sets the size of the InputBarButtonItem which overrides the intrinsicContentSize. When set to nil the default intrinsicContentSize is used. The new size will be laid out in the UIStackView that the InputBarButtonItem is held in
Declaration
Swift
open func setSize(_ newValue: CGSize?, animated: Bool)
Parameters
newValue
The new size
animated
If the layout should be animated
-
Used to setup your own initial properties
Declaration
Swift
open func configure(_ item: InputBarButtonItemAction) -> Self
Parameters
item
A reference to Self
Return Value
Self
-
Sets the onKeyboardEditingBeginsAction
Declaration
Swift
open func onKeyboardEditingBegins(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onKeyboardEditingBeginsAction
Return Value
Self
-
Sets the onKeyboardEditingEndsAction
Declaration
Swift
open func onKeyboardEditingEnds(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onKeyboardEditingEndsAction
Return Value
Self
-
Sets the onTextViewDidChangeAction
Declaration
Swift
open func onTextViewDidChange(_ action: @escaping (_ item: InputBarButtonItem, _ textView: InputTextView) -> Void) -> Self
Parameters
action
The new onTextViewDidChangeAction
Return Value
Self
-
Sets the onTouchUpInsideAction
Declaration
Swift
open func onTouchUpInside(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onTouchUpInsideAction
Return Value
Self
-
Sets the onSelectedAction
Declaration
Swift
open func onSelected(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onSelectedAction
Return Value
Self
-
Sets the onDeselectedAction
Declaration
Swift
open func onDeselected(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onDeselectedAction
Return Value
Self
-
Sets the onEnabledAction
Declaration
Swift
open func onEnabled(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onEnabledAction
Return Value
Self
-
Sets the onDisabledAction
Declaration
Swift
open func onDisabled(_ action: @escaping InputBarButtonItemAction) -> Self
Parameters
action
The new onDisabledAction
Return Value
Self
-
Executes the onTextViewDidChangeAction with the given textView
Declaration
Swift
open func textViewDidChangeAction(with textView: InputTextView)
Parameters
textView
A reference to the InputTextView
-
Executes the onKeyboardEditingEndsAction
Declaration
Swift
open func keyboardEditingEndsAction()
-
Executes the onKeyboardEditingBeginsAction
Declaration
Swift
open func keyboardEditingBeginsAction()
-
Executes the onTouchUpInsideAction
Declaration
Swift
open func touchUpInsideAction()
-
An InputBarButtonItem that’s spacing property is set to be .flexible
Declaration
Swift
open static var flexibleSpace: InputBarButtonItem
-
An InputBarButtonItem that’s spacing property is set to be .fixed with the width arguement
Declaration
Swift
open class func fixedSpace(_ width: CGFloat) -> InputBarButtonItem