intuit/CardParts

Add a component based on UITextView

rcole34 opened this issue · 2 comments

Existing CardParts are built around UILabel or UITextField, which lack some of the customizable power of UITextView. For instance, you can set the attributedText property of these other components, but links in attributed text are only clickable in UITextView. Additionally, I am not aware of the other UIKit text components having the ability to set exclusion paths to be able to wrap text around images in the way that UITextView can.

Attributed text gives us the ability to customize a lot about the text itself, but we would like to be able to have links in attributed text, and set exclusion paths to improve text wrapping capabilities. These are the main use cases I have in mind, but other attributes of UITextView should be explored and supported in a new feature.

Active Label takes an interesting approach to a similar issue of being able to have hyperlinks, as does TTTAttributedLabel. However, both of those come with their own issues, and still do not seem to be built on UITextView. We can also investigate https://github.com/ReactiveX/RxSwift/blob/master/RxCocoa/iOS/UITextView%2BRx.swift for bindings of UITextView properties with RxSwift.

Semi-similar idea - a card part that can render markup?

This has been completed by PR #214 and released in version 2.23.0