ios - Replace/delete characters [• ] in UITextView on Enter
问题 I have a UITextView with a custom NSTextStorage, where I add a list bullet, after each Enter, if the prior line starts with a list bullet. When a user Enter and there is only a list bullet in the beginning of the line where the cursor is, I remove the list bullet and stay on that line. The first function works as expected. But I have a hard time figuring out how to remove the list bullet. if prefix.isEmpty { let text = string.split(separator: "\n") let next = NSMakeRange(textView