How to hide UINavigationBar 1px bottom line

后端 未结 30 2185
不知归路
不知归路 2020-11-22 08:58

I have an app that sometimes needs its navigation bar to blend in with the content.

Does anyone know how to get rid of or to change color of this annoying little ba

30条回答
  •  感情败类
    2020-11-22 09:32

    Below can help simply!

    Swift:

    self.navigationController?.navigationBar.setValue(true, forKey: "hidesShadow")
    

    Objective C:

    [self.navigationController.navigationBar setValue:@(YES) forKeyPath:@"hidesShadow"];
    

提交回复
热议问题