2014-09-29 42 views
0

我在側邊欄中使用UITableViewController,並且在我的應用程序中使用狀態欄作爲白色。我在我的應用程序中使用帶有SWRevealViewController的SidebarDemo庫。一切工作正常,只有我的問題是當我打開我的側邊欄,它顯示頂部的白色空間,這是很少在應用程序中,並在下面的截圖中提到。 Status bar issueUITableViewController中的狀態欄問題(SidebarController)

我試圖通過代碼隱藏我的狀態欄下方

[[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的標題的我的補充工具欄類是從UITableViewController繼承的。請諮詢如何解決此問題。

回答

0

我也使用了這個Sidebar Demo應用程序。我有這個SideBarViewController的一些問題。我解決了這些問題。首先嚐試更改MainViewController中狀態欄的tintColor。

_sidebarButton.tintColor = [UIColor colorWithRed:94.0f/255.0f green:48.0f/255.0f blue:19.0f/255.0f alpha:1.0f]; 

默認情況下它會是這樣

_sidebarButton.tintColor = [UIColor colorWithWhite:0.1f alpha:0.9f]; 

你也可以改變從UITableViewControllerSideBarViewControllerUIViewController和實施在SideBarViewControllerUITableViewDelegates和做所有的定製到在故事板中查看。這是我爲解決我遇到的問題所做的。

Lemme知道我是否可以幫助您使用此SideBar Demo應用程序代碼。