Post not yet marked as solved
Post marked as unsolved with 0 replies, 294 views
I have a simple project where I replace the NSLayoutManager for a UITextView initialized in a storyboard using UITextView.textContainer.replaceLayoutManager(…).
On iOS 14.5, the layout manager is correctly replaced and the overridden drawUnderline function is called to correctly render the text using the subclassed NSLayoutManager.
On iOS 15.2, none of the overridden functions in the NSLayoutManager subclass are being called, and no text is rendered in the UITextView.
Custom NSLayoutManager:
CaptionTextLayoutManager.swift
ViewController:
ViewController.swift
Result (iOS 14.5 on the left, iOS 15.2 on the right):
I think this is a regression in iOS 15 and not from my code, however I could be missing something.