在viewWillAppear
方法中敲以下代码:
- (void)viewWillAippear:(BOOL)animated {
[super viewWillAppear:animated];
//去除导航栏下方的横线
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init]
forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
}
网友评论