I build a app Demo, use hidesBottomBarWhenPushed hide Tabbar in Push Animation.
B
i'll provide another solution for this bug(seems apple made).
and the solution is not to forbid the tabbar move up , but to make the black area will not show when tabbar move up
the core thing is add a subview to your viewcontroller as it deepest subview and this subview's frame is the window size.so when the tabbar moves up , this subview will shown insteadof black area
if (@available(iOS 11.0, *)) {
UIView* bgView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
bgView.autoresizingMask = UIViewAutoresizingNone;
bgView.backgroundColor = UIColorFromRGB(0xefeff4);
[self.view addSubview:bgView];
}
the convenience of this method is you will not have to subclass tabbar or overwrite navigationcontroller's push method