Search code examples
iosiphoneobjective-cuinavigationbartranslucency

Why black screen display between navigationBar and view


In my project have Two View Controller(First & Second) embed in a navigation controller and Translucent is set NO. but i have used prompt in First ViewController.

I used AutoLayout. if you know the solution with and without AutoLayout i will really happy

enter image description here

enter image description here

when i push to second viewcontroller. i got some black screen under navigation bar

enter image description here

I tried plenty of concept but any helped.

help me How to fix.

NOTE:

Don't say set Translucent is YES. I know if i set yes it works perfectly. but i need achieve with Translucent is NO

Updated 1: Images are updated.


Solution

  • i used this code. but i won't any hardcode solution. if you have know any other solution please share

    [UIView animateWithDuration:0.3 animations:^{
            self.view.frame=CGRectMake(0, self.navigationController.navigationBar.frame.size.height+20, 320, 504);
    }];