intuit / CardParts

A reactive, card-based UI framework built on UIKit for iOS developers.
Other
2.52k stars 224 forks source link

Add a component based on UITextView #212

Closed rcole34 closed 4 years ago

rcole34 commented 4 years ago

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.

lwdupont commented 4 years ago

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

croossin commented 4 years ago

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