1
votes

I have a UITableView set in a UIViewController that displays a grouped UITableView. It looks great sitting there but when I go to scroll up all of the text just passes straight through the status bar. I've done some searching around and it seems to be a common problem. I've tried embedding the view in a navigation controller but that doesn't give me the result I want. I want to have a status bar that is semi-transparent such that my content is visible through the status bar but doesn't interfere with it. Could someone steer me in the right direction?

Essentially I want the translucent look when embedded in a Navigation Controller but without the extra Navigation Bar at the top.

2

2 Answers

1
votes

If you delete the default ViewController and replace it with a TableViewController that you drag into the Storyboard from the Object Library you get this problem. Fix programmatically using:

self.tableView.contentInset = UIEdgeInsetsMake(20.0f, 0.0f, 0.0f, 0.0f);

Preferably replace 20 with myViewController.topLayoutGuide...

0
votes

Add following thing in your .plist

View controller-based status bar appearance  NO

and use

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];

More information : Change iOS7 Status Bar Colour programmatically, mid-run?