iosobjective-cios7-statusbar

How to make statusbar not transparent (storyboard)


I've got a pretty straightforward question and somehow I didn't find an answer on this site yet. I've got a view with a background a yellow color. I'm displaying content in the view and in order for the statusbar to not conflict with the content, I want the background to be non-transparent and preferably set to specific color.

How do I do this with storyboards?


Solution

  • The only way I see is to add a 20 height view aligned to the top of the view to act as a status bar background.

    20 is the current size of the status bar but it's better if u get it programatically.

    [UIApplication sharedApplication].statusBarFrame.size.height