1

I am facing a strange issue right now, I have developed an app which contain UITabBar and inside tabBarController there are 5 tabs when I run the application in Xcode 11 gm seed version. After login successfully I load the tabbar. By default its load the tab at index 0.At index 0 navigation bar load perfectly fine without the overlapping status bar. but when I move to the other tabs then navigationbar get disturb with the overlapping status bar,I don't know how to deal with this issue, but 1 think I realize that when I switch the tabs on the storyboard when every time when it loads the first time its navigation display perfectly fine. but for other tabs navigationbar get disturbed.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
adnan
  • 57
  • 1
  • 12

3 Answers3

1

Did you try by using Safe area?

if (@available(iOS 11.0, *)) {
        UIEdgeInsets safeInsets = UIApplication.sharedApplication.delegate.window.safeAreaInsets;
        paddingTop = safeInsets.top;
}

Look at this this for more detail.

Amrit Tiwari
  • 922
  • 7
  • 21
0

I manage to fix this issue just by commenting transition code after login

 //   UIView.transition(from: appDelegate.window.rootViewController!.view, to: tabbarObj.view, duration: 0.65, options: UIViewAnimationOptions.transitionFlipFromRight) { (finished) -> Void in
            appDelegate.window.rootViewController = tabbarObj;
      //  }
adnan
  • 57
  • 1
  • 12
-1

I managed to fix the issue in Xamarin adding this line Window.rootViewController = navBar into the below method in the ViewPresenter class.

protected override UINavigationController CreateNavigationController(UIViewController viewController)
        {
            var navBar = base.CreateNavigationController(viewController);
            navBar.NavigationBarHidden = true;

            Window.RootViewController = navBar;
            return navBar;
        }
Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70
Ruhsar
  • 1
  • 1