Note that there are some explanatory texts on larger screens.

plurals
  1. POUINavigationBar is smaller than it has to be
    primarykey
    data
    text
    <p>I'm developing an app and I have a sing-in/sign-out process. When the user clicks in the sign-out button I want the user to be taken to the home screen. To do this I created the following method in the app delegate:</p> <pre><code>- (void) restartAppWhenLogOut{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; WelcomViewController *welcomeViewController = [[WelcomViewController alloc]init]; self.navController = [[UINavigationController alloc] initWithRootViewController:welcomeViewController]; [self.window setRootViewController:navController]; [self.window makeKeyAndVisible]; } </code></pre> <p>When the user clicks the "Log out" button I call this:</p> <pre><code>[[UIApplication sharedApplication].delegate restartAppWhenLogOut]; </code></pre> <p>And it works fine except for one thing. The UINavigationBar is smaller than it should be! Here is an screenshot of how it looks:</p> <p><img src="https://i.stack.imgur.com/Z7Hjh.png" alt="enter image description here"></p> <p>There is an small black line that should be filled by the UINavigationBar...</p> <p>Any idea why this is happening? </p> <p>=======================================Edit=======================================</p> <p>I removed the new windows creation as <code>David M.</code> told me to do in one comment but It still fails: </p> <pre><code>[self.navController popToRootViewControllerAnimated:NO]; WelcomViewController *welcomeViewController = [[WelcomViewController alloc]init]; self.navController = [[UINavigationController alloc] initWithRootViewController:welcomeViewController]; [self.window setRootViewController:navController]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload