UISearchBar如何定义背景和cancal按钮的背景还有那个输入文字后文字输入框右边的删除按钮 而且要适配ios7
还有ios7下的搜索文字输入框的圆角要怎么修改?
天蓬老师2017-04-17 12:02:00
//隐藏背景
[self.searchBar setBackgroundImage:[UIImage new]];
[self.searchBar setTranslucent:YES];
怪我咯2017-04-17 12:02:00
去看下UISearchBar的文档 Customizing Appearance
https://developer.apple.com/library/ios/documentation/uikit/reference/UISearchBar_Class/Reference.html#//apple_ref/occ/instm/UISearchBar/backgroundImageForBarPosition:barMetrics:
基本看完就能解决你的问题了