PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > 开发编程 > iOS开发教程 > 正文

    ios 除去背景色

    作者:张志勇来源:原创浏览:时间:2020-09-30 00:07:50我要评论
    导读:今天做一个搜索,结果出现了一层背景,要去除这层背景,然后翻笔记找到以前的方法for (UIView *subview in searchBar.subviews){if ([...
    今天做一个搜索,结果出现了一层背景,要去除这层背景,然后翻笔记找到以前的方法
    for (UIView *subview in searchBar.subviews)
     {  
    if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) 
    {  
    [subview removeFromSuperview];  
    break;  
    }  
    发现不能用了
    怎么办,大神在这里:
    这是在一贴吧上找到的
    同时感谢这位名为“ ios小菜鸟”的开发者
    [[[searBar.subviews AtIndex:0].subviews AtIndex:0]removeFromSuperview];
     
    地址:http://www.cocoachina.com/bbs/read.php?tid-256550-page-2.html
    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-155-5994-1.html
    相关热词搜索: