UISearchBarDelegate should have a delegate method that's called when marked text changes
| Originator: | an00na | ||
| Number: | rdar://33236593 | Date Originated: | July 11 2017, 9:21 AM |
| Status: | Open | Resolved: | |
| Product: | iOS + SDK | Product Version: | 11.0 beta 3 |
| Classification: | Suggestion | Reproducible: |
Area: UIKit Summary: UISearchBarDelegate should have a delegate method(or reuse searchBar(_:textDidChange:)) that's called when marked text changes, just like UITextViewDelegate.textViewDidChange(:). Otherwise it's very clumsy—have to resort to something like repeating polling— to achieve what Session 242 WWDC 2017 advocates(https://developer.apple.com/videos/play/wwdc2017-242/?time=1628): "when user type in Chinese for example, before users select the candidate, Spotlight engine already start to show you all the results." Steps to Reproduce: 1. Launch sample app. 2. Activate search bar. 3. Switch to Chinese Pinyin keyboard. 4. Start typing. 5. Read console logs. 6. Activate text view and repeat step 3~5 to see the expected behavior. Code: https://mega.nz/#!VSx3WCRS!15upHSFkyt0EQxSu7eFHUWndFSabRwSxcnF3sUd0MtI
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!