Search bar not calling textDidChange for some reason

折月煮酒 提交于 2019-12-12 01:51:43

问题


I'm very new to Xcode so please excuse my ignorance.

I have a searchBar and a tableView on a ViewController. I have an IBOutlet for the searchBar and I specified searchBar.delegate = self in viewDidLoad. For some reason textDidChange is not getting called when I type in the search bar.

Can anyone help me with this? Thank you.


回答1:


I got it working. Even though I specified searchBar.delegate = self in viewDidLoad, it did not work until I specified the searchBar delegate in the storyboard interface.



来源:https://stackoverflow.com/questions/29109943/search-bar-not-calling-textdidchange-for-some-reason

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!