2014-10-13 77 views
1

的UITableView的是裏面NavigationController,但導航欄通過此行隱藏:如何用隱藏的導航欄更改UITableView的狀態欄bgcolor?

[[self navigationController] setNavigationBarHidden:YES animated:YES]; 

我有什麼:

我想要什麼:

我已經試過:

  • How to change Status Bar text color in iOS 7:嘗試了1個&第二個步驟,沒有工作。 (第三步將使在狀態欄中白色所有文本)

  • 修改第一小區的框架:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath: 
    
    // for the 1st cell, move frame up to cover status bar 
    if (indexPath.row == 0) { 
        CGRect frame = cell.frame; 
    // frame.origin.y -= 50; 
        frame.size.height += 50; 
        cell.frame = frame; 
    } 
    
+0

顯示設置的實現代碼如下背景色redcolor –

回答

0

原來,我必須設置整個的背景顏色UITableView,就這麼簡單。

+0

怎麼樣的狀態欄?他們是否自動變爲白色? – myatmins

0

將實現代碼如下背景顏色的redcolor則狀態欄將在redcolor