how to change UISearchBar from round to rectangle?

后端 未结 12 1733
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 01:54

i will like to know how do i need to change a UISearchBar from the default round curve to a rectangle.

\"enter

12条回答
  •  故里飘歌
    2021-02-09 02:15

    Swift 3

        let textFieldInsideUISearchBar = searchBar.value(forKey: "searchField") as? UITextField
        textFieldInsideUISearchBar?.borderStyle = .none
        textFieldInsideUISearchBar?.backgroundColor = UIColor.white
    

提交回复
热议问题