1

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.

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
user3185748
  • 2,478
  • 8
  • 27
  • 43

2 Answers2

1

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...

David Karlsson
  • 9,396
  • 9
  • 58
  • 103
  • If that does not work look through [this](http://stackoverflow.com/questions/18900428/ios-7-uitableview-shows-under-status-bar) – David Karlsson Jan 05 '15 at 00:57
0

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?

Community
  • 1
  • 1
Divya Bhaloidiya
  • 5,018
  • 2
  • 25
  • 45
  • 1
    I did as you suggested but I didn't see any change. Here is what my window looks like now: http://imgur.com/rip9BNU notice how it is completely transparent. I want to have a solid opaque/semi-transparent status bar such as you'd find in Apple's iOS 8 Game Centre app. – user3185748 Jan 02 '15 at 14:06