IOS searchBar 修改背景颜色

来源:互联网 发布:combo端口是什么意思 编辑:程序博客网 时间:2024/05/21 14:07

if (CurrentSystemVersion >=7.1) {

        [[[[searchBar.subviewsobjectAtIndex:0]subviews] objectAtIndex:0]removeFromSuperview];

        [searchBar setBackgroundColor:[UIColorclearColor]];

    }elseif(CurrentSystemVersion <7.0){

        [[searchBar.subviewsobjectAtIndex:0]removeFromSuperview];

        [searchBar setBackgroundColor:[UIColorclearColor]];

    }else{

    

        [searchBarsetBarTintColor:[UIColorclearColor]];

        [searchBar setBackgroundColor:[UIColorclearColor]];

    }


0 0
原创粉丝点击