InputTextView

open class InputTextView: UITextView

A UITextView that has a UILabel embedded for placeholder text

Important Notes

  1. Changing the font, textAlignment or textContainerInset automatically performs the same modifications to the placeholderLabel
  2. Intended to be used in an MessageInputBar
  3. Default placeholder text is New Message
  4. Will pass a pasted image it’s MessageInputBar‘s InputManagers
  • Undocumented

    Declaration

    Swift

    open override var text: String!
  • Undocumented

    Declaration

    Swift

    open override var attributedText: NSAttributedString!
  • The images that are currently stored as NSTextAttachment’s

    Declaration

    Swift

    open var images: [UIImage]
  • Undocumented

    Declaration

    Swift

    open var components: [Any]
  • Undocumented

    Declaration

    Swift

    open var isImagePasteEnabled: Bool = true
  • A UILabel that holds the InputTextView’s placeholder text

    Declaration

    Swift

    open let placeholderLabel: UILabel =
  • The placeholder text that appears when there is no text. The default value is New Message

    Declaration

    Swift

    open var placeholder: String? = "New Message"
  • The placeholderLabel’s textColor

    Declaration

    Swift

    open var placeholderTextColor: UIColor? = .lightGray
  • The UIEdgeInsets the placeholderLabel has within the InputTextView

    Declaration

    Swift

    open var placeholderLabelInsets: UIEdgeInsets = UIEdgeInsets(top: 4, left: 7, bottom: 4, right: 7)
  • The font of the InputTextView. When set the placeholderLabel’s font is also updated

    Declaration

    Swift

    open override var font: UIFont!
  • The textAlignment of the InputTextView. When set the placeholderLabel’s textAlignment is also updated

    Declaration

    Swift

    open override var textAlignment: NSTextAlignment
  • Undocumented

    Declaration

    Swift

    open override var scrollIndicatorInsets: UIEdgeInsets
  • A weak reference to the MessageInputBar that the InputTextView is contained within

    Declaration

    Swift

    open weak var messageInputBar: MessageInputBar?
  • Undocumented

    Declaration

    Swift

    public convenience init()
  • Undocumented

    Declaration

    Swift

    public override init(frame: CGRect, textContainer: NSTextContainer?)
  • Undocumented

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Sets up the default properties

    Declaration

    Swift

    open func setup()
  • Undocumented

    Declaration

    Swift

    open override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool
  • Undocumented

    Declaration

    Swift

    open override func paste(_ sender: Any?)