Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1

前端 未结 12 1762
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 19:04

When I am navigating back & forth between parent and child controllers in a master - detail navigation controller, i see a dark shadow on the right side of navigation ba

12条回答
  •  Happy的楠姐
    2020-11-30 19:15

    Here is my variation...it requires much less code than tom's answer, and is more efficient. This is IF you want a translucent navigation bar, and also want to fix that shadow problem.

    In the source ViewController (that is embedded in the Navigation Controller)...

    - (void)viewDidAppear:(BOOL)animated
    {
         self.navigationController.navigationBar.translucent = YES;
    }
    

    and

     - (void)viewWillDisappear:(BOOL)animated
     {
         self.navigationController.navigationBar.translucent = NO;
     }
    

    The result is the same as what Tom does (visually, to the end user), and is easier to implement. Hope this helps...

提交回复
热议问题