修改UISearchBar的Cancel按钮的颜色和文字

参考:http://www.cnblogs.com/sunshine-anycall/p/4185304.html

两行代码搞定:

[[UIBarButtonItemappearanceWhenContainedInInstancesOfClasses:@[[UISearchBarclass]]]setTitle:@"取消"];

[[UIBarButtonItemappearanceWhenContainedInInstancesOfClasses:@[[UISearchBarclass]]]setTintColor:[UIColorwhiteColor]];

你可能感兴趣的:(修改UISearchBar的Cancel按钮的颜色和文字)