如何在 ios7 中为 UISearchBar 的背景应用圆角和边框?我可以更改栏的背景颜色。
像这样
谢谢
最佳答案
UISearchBar *searchBar = [[UISearchBar alloc] init];
searchBar.layer.cornerRadius = 6;
searchBar.clipsToBounds = YES;
[searchBar.layer setBorderWidth:1.0];
[searchBar.layer setBorderColor:[[UIColor lightGrayColor].CGColor];
关于ios - 将圆角和边框设置为 ios7 中 UISearchBar 的背景(不是 UITextField),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22807074/