您的位置:首页 > 其它

修改searchBar两种后背景颜色

2016-05-20 13:24 363 查看
searchbar.barTintColor = [UIColor
whiteColor];

    

    UIColor *innerColor =
kColor(235,
235, 241, 1);;

    for (UIView* subview
in [[searchbar.subviews
lastObject] subviews]) {

        if ([subview
isKindOfClass:[UITextField
class]]) {

            UITextField *textField = (UITextField*)subview;

            textField.backgroundColor = innerColor;

        }

    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息