How to change the position or hide magnifier icon in UISearchBar in IOS 7?

前端 未结 3 2032
野趣味
野趣味 2021-02-02 13:15

I am working on IOS 7 application.By default its appearing like Pic(1).But I need to change it as Pic(2).I googled and found few answers for the requirement,but it has not chang

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-02 13:58

    You could try:

    searchBar.setImage(UIImage(named: "yourimage")!, forSearchBarIcon: UISearchBarIcon.Clear, state: UIControlState.Normal)
    

提交回复
热议问题