使用如下代码
self.edgesForExtendedLayout = UIRectEdgeNone;
导航栏和TabBar的背景色会变灰色,解决办法如下
self.navigationController.navigationBar.translucent = NO;
self.tabBarController.tabBar.backgroundColor = [UIColor whiteColor];
self.edgesForExtendedLayout = UIRectEdgeNone;