Navigation bar for split view controller is darker when inside a tab bar controller

前端 未结 3 2045
忘了有多久
忘了有多久 2021-02-06 11:01

If you place a split view controller inside a tab bar controller the navigation bar and tab bar are darker on the left side. I\'ve attached a screenshot. I created this by cre

3条回答
  •  死守一世寂寞
    2021-02-06 11:30

    Set the navigation controller's view backgroundColor to white:

    self.navigationController?.view.backgroundColor = UIColor.whiteColor()
    

    This will preserve the light gray color.

    You can also disable translucency, but then the navigation bar will be white:

    self.navigationController?.navigationBar.translucent = false
    

    The answers come from this Stack Overflow question: Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1

提交回复
热议问题