UISearchBar: Changing the appearance - Shape, Background, Overlay an Image

六月ゝ 毕业季﹏ 提交于 2019-12-01 13:23:02

Upon some investigating of possibilites to customize the search bar, I'm inclined to say this is a custom component that has nothing to do with UISearchBar, but instead recreates its functionality.

You don't need to subclass anything. Create a new UIView that has the buttons and text field and then when then entire view is going to load do this:

[self.searchDisplayController.searchBar addSubview:customSearchBarView];

Make sure to set the new text field as the first responder so it has access to the keyboard.

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