UITabBar items jumping on back navigation on iOS 12.1

后端 未结 12 977
北恋
北恋 2020-11-29 18:28

I have an iOS app with UITabBarController on a master screen, navigating to a detail screen hiding the UITabBarController with setting hidesB

12条回答
  •  离开以前
    2020-11-29 18:42

    You can override - (UIEdgeInsets)safeAreaInsets method for few iOS 12 subversions with this:

    - (UIEdgeInsets)safeAreaInsets {
        UIEdgeInsets insets = [super safeAreaInsets];
        CGFloat h = CGRectGetHeight(self.frame);
        if (insets.bottom >= h) {
            insets.bottom = [self.window safeAreaInsets].bottom;
        }
        return insets;
    }
    

提交回复
热议问题