TextToolBar
public final class TextToolBar : UIView
extension TextToolBar: UITextViewDelegate
extension TextToolBar: UICollectionViewDataSource
Undocumented
-
Undocumented
Declaration
Swift
public static let safeAreaBottom: CGFloat -
Undocumented
Declaration
Swift
public static let textContainerHeight: CGFloat -
Undocumented
Declaration
Swift
public static let textContainerMaxHeight: CGFloat -
Undocumented
Declaration
Swift
public static let avatarWidth: CGFloat -
Undocumented
Declaration
Swift
public static let replyContainerHeight: CGFloat -
Undocumented
Declaration
Swift
public static let imagesCollectionHeight: CGFloat -
Undocumented
Declaration
Swift
public static let openGraphPreviewContainerHeight: CGFloat -
Returns an instance of
TextToolBar.Declaration
Swift
public static func make() -> TextToolBar
-
An
AvatarView.Declaration
Swift
public private(set) lazy var avatarView: AvatarView { get set } -
An
UITextView. You have to use thetextproperty to change the value of the text view.Declaration
Swift
public private(set) lazy var textView: UITextView { get set } -
The default text view attributes.
Declaration
Swift
public var textViewTextAttributes: [NSAttributedString.Key : Any] -
A placeholder label. You have to use the
placeholderTextproperty to change the value of the placeholder label.Declaration
Swift
public private(set) lazy var placeholderLabel: UILabel { get set } -
A send button.
Declaration
Swift
public private(set) lazy var sendButton: UIButton { get set } -
An
UIActivityIndicatorView.Declaration
Swift
public private(set) lazy var activityIndicatorView: UIActivityIndicatorView { get set } -
The text of the text view.
Declaration
Swift
public var text: String { get set } -
An option to show the avatar.
Declaration
Swift
public var showAvatar: Bool { get set } -
The send button title by default.
Declaration
Swift
public var sendTitle: String -
The cancel title of the send button by default.
Declaration
Swift
public var cancelTitle: String -
The placeholder text.
Declaration
Swift
public var placeholderText: String { get set }
-
A reply text.
Declaration
Swift
public var replyText: String? { get set }
-
Enables the detector of links in the text.
Declaration
Swift
public var linksDetectorEnabled: Bool -
The color of underline that founded link in the text.
Declaration
Swift
public var linksHighlightColor: UIColor -
The Open Graph data of the founded link in the text.
Declaration
Swift
public internal(set) var openGraphData: OGResponse? { get }
-
Picked images.
Declaration
Swift
public var images: [UIImage]
-
Add the
TextToolBarto a view container. Use this method to addTextToolBarto the view hierarchy and you no need to do any other layout actions.Declaration
Swift
public func addToSuperview(_ view: UIView, placeholderText: String = "Leave a message", sendButtonAction: UIControl.Action? = nil)Parameters
viewthe superview.
placeholderTextthe placeholder text.
sendButtonActionthe send button action.
-
Check if the content is valid: text is not empty or at least one image was added.
Declaration
Swift
public var isValidContent: Bool { get } -
Reset states of all child views and clear all added/generated data.
Declaration
Swift
public func reset() -
Toggle
isUserInteractionEnabledstates for all child views.Declaration
Swift
public var isEnabled: Bool { get set } -
Update the placeholder and send button visibility.
Declaration
Swift
public func updatePlaceholder() -
Add an Activity to the flat feed.
Declaration
Swift
public func addActivity(to flatFeed: FlatFeed, completion: @escaping ActivityCompletion<Activity>) -
Undocumented
Declaration
Swift
func updateOpenGraph(_ dataDetectorURLItems: [DataDetectorURLItem]) -
Undocumented
Declaration
Swift
func underlineLinks(with dataDetectorURLItems: [DataDetectorURLItem]) -
Undocumented
Declaration
Swift
func updateOpenGraphPreview() -
Upload images and get URL’s.
Declaration
Swift
public func uploadImages(imagePrefixFileName: String = "image", _ completion: @escaping (_ imageURLs: [URL]?, _ error: Error?) -> Void)
-
Update the height of the text view for a big text length.
Declaration
Swift
func updateTextHeightIfNeeded()
-
Undocumented
Declaration
Swift
public func textViewDidBeginEditing(_ textView: UITextView) -
Undocumented
Declaration
Swift
public func textViewDidEndEditing(_ textView: UITextView) -
Undocumented
Declaration
Swift
public func textViewDidChange(_ textView: UITextView)
-
Undocumented
Declaration
Swift
@objc func keyboardUpdated(_ notification: NSNotification)
-
Enables the image picking with a given view controller. The view controller will be used to present
UIImagePickerController.Declaration
Swift
public func enableImagePicking(with viewController: UIViewController) -
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int -
Undocumented
Declaration
Swift
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
View on GitHub
TextToolBar Class Reference