TextKit 2 viewport

TextKit 2 looks great. The video demonstrates the sample app on both MacOS and iPad. However the downloaded code only works on MacOS and the documentation says the NSTextViewportLayoutController is only available on MacOS, so when can we expect the IOS versions. And what about integration with SwiftUI?

Hi there,

There should be an example available for iOS, this is an issue present in Seed 1. Please check back for an updated version of the sample project in a later seed build.

The TextKit 2 portions are very similar between the two platforms. The code in the Shared folder is used on both platforms, and NSTextContentManagerDelegate and NSTextContentStorageDelegate implementations in TextDocumentViewController will also be similar.

Thanks for your patience!

The sample code has been updated in Seed 2 with the iOS version shown in the session video.

You can download the updated sample here: Using TextKit 2 to Interact with Text

TextKit 2 viewport
 
 
Q