iOS中设置导航栏透明
2017-08-04 本文已影响0人
莫忘小猪
方式一:
self.navigationController.navigationBar.subviews.firstObject.alpha = 0.0;
方式二:
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navback"] forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [UIImage imageNamed:@"navback"];
(navback是一张透明的图片)
