Doc of [UITextInput offsetFromPosition:toPosition:] is wrong
| Originator: | an00na | ||
| Number: | rdar://16912444 | Date Originated: | 14-May-2014 |
| Status: | Closed | Resolved: | Yes |
| Product: | Documentation | Product Version: | |
| Classification: | Serious Bug | Reproducible: |
Summary: Doc of [UITextInput offsetFromPosition:toPosition:] says: Return the number of visible characters between one text position and another text position. But actually, it returns the number of UTF-16 characters. For example, for a visible character(\U0001F604) composed of a surrogate pair, it returns 2 instead of 1. Steps to Reproduce: 1. Launch sample app(http://cl.ly/412O182t3d1l). 2. Read console logs.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!