【问题标题】:How to make UINavigationBar fully transparent or gone like this only title and UIBarButtonItem could be seen如何使 UINavigationBar 完全透明或消失,只能看到标题和 UIBarButtonItem
【发布时间】:2014-09-23 03:15:13
【问题描述】:

如您所见,UINavigationBar 是完全透明的。只有标题和 UIBarButtonItem 是可见的。并且状态栏的颜色与 UITableView 的背景颜色相同。现在,我已经完成了表格视图和单元格与图片相同的效果。但是如何让导航栏和状态栏也有效果呢?

【问题讨论】:

    标签: ios uitableview uinavigationbar uistatusbar


    【解决方案1】:

    试试这个

        self.navigationController.navigationBar.shadowImage = [UIImage new];
        self.navigationController.navigationBar.translucent = YES;
        self.navigationController.view.backgroundColor = [UIColor clearColor];
        [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    

    【讨论】:

      【解决方案2】:

      试试这个!

      [self.navigationController.navigationBar setBackgroundColor:[UIColor clearColor]];
      [self.navigationController.view setBackgroundColor:[UIColor clearColor]];
      [self.navigationController.navigationBar setBarTintColor:[UIColor clearColor]];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-01-19
        • 1970-01-01
        • 2014-03-17
        • 1970-01-01
        • 2011-06-21
        • 1970-01-01
        相关资源
        最近更新 更多