去除navigationBar上那条线: ///隐藏navigationBar导航栏线(直接写在UINavigationController-viewDidLoad方法里面即可) UIView *backgroundView = [self.navigationBar subviews].firstObject; _lineView = backgroundView.subviews.firstObject; _lineView.hidden = YES;去除前(效果图):去除后(效果图):