【发布时间】:2014-11-23 23:08:48
【问题描述】:
我在侧边栏中使用 UITableViewController,并且我的应用程序中的状态栏为白色。我在我的应用程序中使用带有 SWRevealViewController 的 SidebarDemo 库。一切正常,只有我的问题是当我打开 Sidebar 时,它在顶部显示空白,这在应用程序中有点奇怪,并在下面的屏幕截图中提到。
我尝试通过下面的代码隐藏我的状态栏
[[UIApplication sharedApplication] setStatusBarHidden:YES];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
// self.edgesForExtendedLayout=UIRectEdgeNone;
// self.extendedLayoutIncludesOpaqueBars=NO;
// self.automaticallyAdjustsScrollViewInsets=NO;
//self.tableView.contentInset = UIEdgeInsetsMake(20.0f, 20.0f, 0.0f, 0.0f);
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectZero];
self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
self.tableView.contentOffset = CGPointMake(0, -20);
但是 tableView 并没有向上移动。我在 TableView 中具有 Profile 标题的 Sidebar 类是从 UITableViewController 继承的。请告知如何解决此问题。
【问题讨论】:
标签: ios7 uinavigationbar xcode6 statusbar uistatusbar