ChavezChen / CWLateralSlide

One line of code to integrate 0 coupling side drawer!一行代码集成0耦合侧滑抽屉!
MIT License
1.28k stars 201 forks source link

iPhone X 缩小侧滑导致 TabBarItem 向下偏移 #89

Closed chen570075003 closed 6 years ago

chen570075003 commented 6 years ago

iPhone X Simulator iOS 11.1

iphone x

chen570075003 commented 6 years ago

看到了处理的文章https://juejin.im/post/5a6bf18ff265da3e5859947f 在TabbarController的- (void)viewDidAppear:添加处理代码,完美解决:

if (!ISiPhoneX) return;
    CGRect frame = self.tabBar.frame;
    CGFloat h = 83 - frame.size.height;
    frame.size.height += h;
    frame.origin.y -= h;
    self.tabBar.frame = frame;