美文网首页UI
UITabBar去除顶部横线

UITabBar去除顶部横线

作者: Jackson_Z | 来源:发表于2020-09-27 16:51 被阅读0次
    SMTabBar *tabbar = [SMTabBar new];
    tabbar.tintColor = SkinColor(ZWTTabBarTextSelectColorKey);
    tabbar.barTintColor = [UIColor whiteColor];
    tabbar.delegate = self;
    [self setValue:tabbar forKey:@"tabBar"];
    
    
    // UITabBar去除顶部横线
    UITabBar *tabBar = [UITabBar appearance];
    [tabBar setBackgroundColor:[UIColor whiteColor]];
    [tabBar setBackgroundImage:[UIImage new]];
    [tabBar setShadowImage:[UIImage new]];
        
    if (@available(iOS 13.0, *)){
        UITabBarAppearance* tabBarAppearance = [[UITabBarAppearance alloc] init];
        tabBarAppearance.shadowColor = [UIColor clearColor];
        [tabBar setStandardAppearance:tabBarAppearance];
    }
    

    相关文章

      网友评论

        本文标题:UITabBar去除顶部横线

        本文链接:https://www.haomeiwen.com/subject/rjjluktx.html