的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; }
顯示設置的實現代碼如下背景色redcolor –