导航栏设置成透明

//设置导航模拟全透明导航[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"transparent.png"] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
self.navigationController.navigationBar.translucent = YES;
//去掉导航下面的一条白线
self.navigationController.navigationBar.clipsToBounds = YES;
self.automaticallyAdjustsScrollViewInsets = NO;
//修改navgationBar的字体的颜色
[self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName,nil]];

你可能感兴趣的:(导航栏设置成透明)