The example project of TextKit 2 did't implement the indented, nested comments like the one shown in the session

Hi there, The example project provided along with the session video doesn't behave like the one shown in the video: the comments are not indented. I couldn't find where the commentDepth value is being used in drawing anywhere. Is it possible to get an updated version with the indentation implemented of this example project? Thanks.

Answered by Frameworks Engineer in 678708022

Hello,

Looks like the lack of indentation is an issue present with Seed 1. Please stay tuned for an updated version in a later seed.

Thanks for your patience!

Accepted Answer

Hello,

Looks like the lack of indentation is an issue present with Seed 1. Please stay tuned for an updated version in a later seed.

Thanks for your patience!

The sample code has been updated in Seed 2 and should indent properly now.

The BubbleLayoutFragment overrides the leadingPadding, trailingPadding, topMargin, and bottomMargin on the NSTextLayoutFragment to achieve the indentation seen in the session video.

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

The example project of TextKit 2 did't implement the indented, nested comments like the one shown in the session
 
 
Q