In TextKit 1, I can override drawBackground(forGlyphRange:at:) in NSLayoutManager to do custom background drawing. However, I'm not too sure what the designated way of doing background drawing is in TextKit 2.
One thing I've tried is to do custom drawing in my own CALayer that's used in the configureRenderingSurface delegate callback, but I'm unsure if we are suppose to use this API and steal the textViewportLayoutController.delegate away from _UITextLayoutcanvasView?
How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here
What's new in TextKit and text views
RSS for tagDiscuss the WWDC22 Session What's new in TextKit and text views
Posts under wwdc2022-10090 tag
1 Post
Sort by: