iOS 8中完全透明的UITabBar [英] Completely transparent UITabBar in iOS 8

查看:885
本文介绍了iOS 8中完全透明的UITabBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使我的tabBar透明,我已经搜索了但是我找到的所有文章都是部分且不完全透明的tabBars,有些是IOS 5等等。

I'm trying to make my tabBar transparent, I've searched but all I found was articles resulting in partly and not fully transparent tabBars and some were for IOS 5, etc.

我想实现这一点,如草图3所示:

I would like to accomplish this as seen in Sketch 3:

最简单的方法是什么?

我想这样做:

    // Make the tabBar transparent
self.tabBarController.tabBar.backgroundColor = [UIColor clearColor];
self.tabBarController.tabBar.translucent = YES;

但结果并不完美:

真的很感激帮助!:)

Really appreciate help!:)

此致
Erik

Sincerely, Erik

更新

// Make the tabBar transparent
[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
self.tabBarController.tabBar.translucent = YES;


推荐答案

你试过 barTintColor

[[UITabBar appearance] setBarTintColor:[UIColor clearColor]];
[[UITabBar appearance] setBackgroundImage:[UIImage new]];

这应该可以解决问题。

这篇关于iOS 8中完全透明的UITabBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆