AutocompleteField icon indicating copy to clipboard operation
AutocompleteField copied to clipboard

NSAttributedString range error

Open NickMeepo opened this issue 3 years ago • 0 comments

We should use NSString.length instead of String.count when dealing with NSRange and NSAttributedString. NSRange(location: 0, length: (labelText as NSString).length) is preferred to NSRange(location: 0, length:labelText.count). The error will occur when text is matching the suggestion "George😁Washington".

NickMeepo avatar Dec 21 '20 10:12 NickMeepo