Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 13 tabbar layout delay when using setHidesBottomBarWhenPushed #386

Closed
ibespaljkocs opened this issue Apr 27, 2020 · 6 comments
Closed
Labels
Milestone

Comments

@ibespaljkocs
Copy link

Description

UITabbar has a layout delay if setHidesBottomBarWhenPushed is set to YES when opening another screen (e.g: details screen with no bottom tabbar). Layout delay happens on back action, when user returns to previous screen.
This is present only on iOS 13 when not using storyboards!

iOS 13 + storyboard -> OK.
iOS < 13 + storyboards -> OK.
iOS < 13 w/o storyboards -> OK (e.g: using nibs or manually creating UITabBarController)
Also, it works OK on any iOS if animations are turned off with [UIView setAnimationsEnabled:NO]

Steps to Reproduce

  1. Do not use storyboard (except the LaunchScreen.storyboard)
  2. Use a UITabBarController as a rootViewController of your main window
  3. From selected tab, go to another UIViewController (e.g: DetailsVC) with option setHidesBottomBarWhenPushed set to YES, to hide the bottom bar.
  4. On DetailsVC show PopupBar by calling [self.tabBarController presentPopupBarWithContentViewController:dummyVC animated:YES completion:nil];
  5. Return to rootViewController with back action.

Behaviour: PopupBar is moved up as expected, but UITabbar is shown with some delay.
Video: https://drive.google.com/file/d/1mZCrRn07NXj0MT4ji4XD_HCG9wjFvibG/view

Device, OS and Xcode Versions

iPhone SE, iPhone 11 with iOS 13 (confirmed on 13.4.1 also)

@LeoNatan
Copy link
Owner

Heh, what an odd issue. I don't see why a storyboard presence would influence the layout timing, unless Apple is doing something fishy.

I don't have much time these days, but I will take a look when I can. Thanks

@ibespaljkocs
Copy link
Author

Yes, sounds strange, I agree.
I've just created a simple storyboard with only UITabBarController in it..then subclassed UITabBarController with custom class, assigned it to UITabBarController class in storyboard. Now it works like a charm!

@ivanrein
Copy link

@ibespaljkocs do you have a workaround for this?

@LeoNatan
Copy link
Owner

I'll look at this tomorrow. I haven't seen this reproduce, but will try to.

@LeoNatan LeoNatan added this to the 2.9.x milestone Jul 31, 2020
@LeoNatan
Copy link
Owner

LeoNatan commented Aug 1, 2020

Reproduced, investigating.

LeoNatan added a commit that referenced this issue Aug 1, 2020
@LeoNatan
Copy link
Owner

LeoNatan commented Aug 1, 2020

Fixed. For some reason, when the tab bar is not created from a storyboard, the frame was being overridden. Should work well now.

@LeoNatan LeoNatan closed this as completed Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants