如您所见,UINavigationBar是完全透明的 . 只有 Headers 和UIBarButtonItem可见 . 状态栏与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];
2 回答
试试这个 !
试试这个吧