你的位置:首页 > 软件开发 > 操作系统 > 设置导航栏nav全透明

设置导航栏nav全透明

发布时间:2016-11-23 15:00:07
设置导航栏nav全透明- (void)viewDidLoad {里面添加swift:版本// 1、设置视图背景颜色// self.view.backgroundColor = UIColor(white: 0.25, alpha: 1.0)//// / ...

  设置导航栏nav全透明

- (void)viewDidLoad {里面添加

swift:版本

// 1、设置视图背景颜色

//    self.view.backgroundColor = UIColor(white: 0.25, alpha: 1.0)

//

//    // 2、设置导航栏标题属性:设置标题颜色

//    self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.whiteColor()]

//    // 3、设置导航栏前景色:设置item指示色

//    self.navigationController?.navigationBar.tintColor = UIColor.whiteColor()

//

//    // 4、设置导航栏半透明

//    self.navigationController?.navigationBar.translucent = true

//

//    // 5、设置导航栏背景图片

//    self.navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)

//

//    // 6、设置导航栏阴影图片

//    self.navigationController?.navigationBar.shadowImage = UIImage()

 

 

OC:版本

  

[self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];

[self.navigationController.navigationBar setTranslucent:true];

[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];

原标题:设置导航栏nav全透明

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录