Imported from CleanCocoa/DeclarativeTextKit#2
Since UITextView and NSTextView share most of the underpinnings, including being backed by UTF-16 NSStrings, adding UIKit support should consist of either
- adding an adapter like
NSTextViewBuffer but for UITextView,
- use a
TextViewBuffer (sans prefix) for both.
With conditional compilation, #if os(macOS) around the NSTextView property declaration and initializer should do the trick iff the API really is exactly the same.
Imported from CleanCocoa/DeclarativeTextKit#2
Since
UITextViewandNSTextViewshare most of the underpinnings, including being backed by UTF-16NSStrings, adding UIKit support should consist of eitherNSTextViewBufferbut forUITextView,TextViewBuffer(sans prefix) for both.With conditional compilation,
#if os(macOS)around theNSTextViewproperty declaration and initializer should do the trick iff the API really is exactly the same.UITextView