去除navigationBar上那条线:

    ///隐藏navigationBar导航栏线(直接写在UINavigationController-viewDidLoad方法里面即可)

    UIView *backgroundView = [self.navigationBar subviews].firstObject;

    _lineView = backgroundView.subviews.firstObject;

    _lineView.hidden = YES;

去除前(效果图):

iOS-隐藏Navigation导航栏线-LMLPHP

去除后(效果图):

iOS-隐藏Navigation导航栏线-LMLPHP

05-04 02:03