D34thSt4lker
D34thSt4lker

Reputation: 447

Xcode 11 UINavigationController Bar problems

Ever since Xcode 11 came out I have been trying to fix my app. There is something going on with the Status Bar + Navigation Bar and nothing I have been trying seems to be working and I can't seem to find any related issues either.

I have tried instantiating the Tab Bar Controller with less/more tabs. I tried changing the order. I tried using a navigation bar on the Tab Bar controller instead of the individual view controllers.

For some reason the first View Controller (root of a UINavigation Controller) in the Tab Bar Controller has no issues but when I change tabs, the navigation bar gets pushed up.

I added 2 screenshots to show what is going on. The first image shows the correct way the app is supposed to be and the second image shows the navigation bar being pushed into the status bar.

enter image description here

enter image description here

[UIView transitionFromView:self.window.rootViewController.view
                    toView:viewController.view
                  duration:0.55f
                   options: UIViewAnimationOptionTransitionCrossDissolve
                completion:^(BOOL finished){
                    self.window.rootViewController = viewController;

                }];

Upvotes: 0

Views: 212

Answers (1)

dexyjones
dexyjones

Reputation: 36

I noticed a change with transitionFromView in IOS 13 thats different from IOS 12. To see if this is your issue, try setting self.window.rootViewController = viewController; without the transition code block, and see if you still have the problem.

self.window.rootViewController = viewController;
/*
[UIView transitionFromView:self.window.rootViewController.view
                    toView:viewController.view
                  duration:0.55f
                   options: UIViewAnimationOptionTransitionCrossDissolve
                completion:^(BOOL finished){
                    self.window.rootViewController = viewController;

                }];
*/

Upvotes: 1

Related Questions