Demonstrates that autocorrected NSAttributedString ranges in a UITextView do not carry over custom attributes.
To test:
- Type in the UITextView something that can be autocorrected like "Hello i'm"
- Autocorrect the "i'm" to "I'm" by pressing the spacebar, or choosing the suggestion on the keyboard.
- Observe the value of
textView.textStorage
in the target output. The range for "I'm" will not contain theNSAttributedString.Key.customKey
.
Double-tapping the spacebar to insert a period is also affected.
Latest iOS version tested: 15.2