Multipage Layout of Text on iOS and MacOS with TextKit 2

Hi! First apologies if I may have missed this in the forums somewhere, but I have been unable to find any documentation on multi-page layouts with the newer text kit and have not been able to create this using/modifying the sample code provided from the WWDC conference earlier this year.

What I am trying to do is create a multipage document where the text is editable and the layout is fairly static. When the text expands in the current view to where there is no room left, a new 'page' will be created and the text will spill over there. Basically standard word or google docs type editor. The position for the pages will need be manipulated depending on some properties.

I also intend in wrapping the solution in SwiftUI since the rest of the app this will be used in is a SwiftUI app. If this isn't possible, I may just stick with TextKit1 or punt altogether.

Thanks! Sean

Multi-page layout not supported in TextKit2. See the discussion here: https://developer.apple.com/forums/thread/682251

At WWDC, a frameworks engineer indicated they were looking into it, but there has been no update and the requested Feedback (FB9285387) is still open (Nov 4th) with no recent similar reports. Please file a dupe of FB9285387 if this is important to you.

-Steve

Thanks for catching this one so quickly Steve. I was starting to wonder if there was a bug or I was just using the SDK incorrectly. The app I'm building relies on this as it's in main feature. I will probably stick with TextKit1 for now and rewrite the feature when the next series of changes for TextKit2 is ready or see if someone else has built a different text engine.

Thanks, Sean

Multipage Layout of Text on iOS and MacOS with TextKit 2
 
 
Q