1.普通視圖 布局居底部顯示 運行時 則會距離底部有34的距離 這是因為安全區(qū)域問題禁用安全區(qū)域就行了
2.UITabBarController 設(shè)置顏色時 在x上 底部留白
這要重寫tabbar的backView
UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, UI_tabBar_Height)];
? ? backView.backgroundColor = [UIColor whiteColor];
? ? [self.tabBar insertSubview:backView atIndex:0];
#define kStatusHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define UI_tabBar_Height ((kStatusHeight == 20) ? 49.0 : 83.0)
如果是劉海屏高度增加34