Ios 如何使UINavigationBar完全透明或像这样消失,只有标题和uibarbuttonite可以看到

Ios 如何使UINavigationBar完全透明或像这样消失,只有标题和uibarbuttonite可以看到,ios,uitableview,uinavigationbar,uistatusbar,Ios,Uitableview,Uinavigationbar,Uistatusbar,如您所见,UINavigationBar是完全透明的。只有标题和uibarbuttonite可见。状态栏的颜色与UITableView的背景颜色相同。现在,我已经完成了使表格视图和单元格具有与图片相同的效果。但是如何使导航栏和状态栏也有效果呢 试试这个 [self.navigationController.navigationBar setBackgroundColor:[UIColor clearColor]]; [self.navigationController.view setBackg

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

试试这个

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

    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];