在viewWillAppear 方法中敲以下代碼:
- (void)viewWillAippear:(BOOL)animated {
[super viewWillAppear:animated];
//去除導(dǎo)航欄下方的橫線
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init]
forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
}