我正在尝试将图像设置为 uisearch 栏中的范围栏。我知道可以在分段控制中做到这一点,但我不知道如何在范围栏中做到这一点。
最佳答案
Duplicate: This has been answered HERE:
searchBar.setImage(UIImage(named: "your image"), forSearchBarIcon: .Search, state: .Normal)
关于 swift : Add image to scopebar in uiSearchbar instead of titles,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49034136/