自定义uitabbar

iOS 13 自定义UITabbar高度失效问题,self.tabbar.frame 设置不生效

末鹿安然 提交于 2020-08-14 11:22:26
自定义tabbar高度失效,整体下移,解决办法是原来在viewWillLayoutSubviews写的改到viewDidLayoutSubviews -(void)viewDidLayoutSubviews{ [super viewDidLayoutSubviews]; CGRectframe =self.tabBar.frame; frame.size.height=kNLPTabarHeight; frame.origin.y = self.view.bounds.size.height - kNLPTabarHeight; self.tabBar.frame= frame; [self.tabBar bringSubviewToFront:self.nlpTabBar]; } 来源: oschina 链接: https://my.oschina.net/jack088/blog/4493320