Navigation Controller Transparent Bar Style is not working

前端 未结 12 826
情书的邮戳
情书的邮戳 2020-12-31 13:57

I am using a navigation controller, and I have the style set to :

navController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

But wh

12条回答
  •  情书的邮戳
    2020-12-31 14:25

    If you set your nav controller's navigationBar to transparent in your App delegate early enough (It worked for me before adding the nav controller to the window), it will automatically shift your view up underneath the navigation bar.

    Unfortunately it does not also shift your view underneath the status bar. Sad, it looks like you need to implement your own version of UINavigationController. Luckily, it's not too bad as UINavigationBar is pretty reusable.

提交回复
热议问题