如何使用 UISearchBar 搜索网页?
我想使用 UISearchBar 并使用它的文本,可以将其进一步放入 url 中,并且该 url 将搜索网络。我无法关闭键盘。我尝试过使用第一响应者,但这似乎不起作用。我是 iPhone 开发新手,对编程世界也相当陌生,所以请耐心等待。如有任何帮助,我们将不胜感激。
I want to use the UISearchBar and used its text which further can be put into a url and that url will search the web. I am unable to dismiss the keyboard. I have tried using the first responder thng but that doesn't seems to work. I am new to iPhone development and fairly new to programming world so please bear with me. any help would be appritiated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将搜索栏委托添加到
yourclass.h
中,如下所示:然后,在
yourclass.m
中实现该委托的功能:Add a search bar delegate to
yourclass.h
as following:Then, implement this function of the delegate into
yourclass.m
: