Wrapped NSView/UIView
wrapped NSTextView in NSScrollView / UITextView (already inherit UIScrollView)
use TextKitViewModel as ViewModel (use View-based viewportLayout)
struct ContentView: View {
@StateObject var viewModel = TextKitViewModel("InitialText")
@State private var text: String = "InitialText"
var body: some View {
VStack {
ScrollTextView(text: $text,
textViewFactory: viewModel.textViewFactory,
textViewUpdate: viewModel.textViewUpdate)
}
.padding()
}
}
wrapped NSCollectionView in NSScrollView
wrapped NSOutlineView in NSScrollView
wrapped NSTableView in NSScrollView
wrapped WKWebView (already in NSScrollView/UISScrollView) note: not implemented for iOS yet