11-30-2011, 08:48 AM
#1 (permalink )
Registered Member
Join Date: Nov 2011
Posts: 30
Hide status bar in a single view...?!
I want to show the status bar in my app in all views but one. I have tried modifying the 'status bar is initially hidden' in the plist, i have tried:
[[UIApplication sharedApplication] setStatusBarHidden:YES];
That hides the bar but leaves an ugly blue box where the status bar was (which isn't part of my view, there's nothing blue on there).
I have also tried altering the layout wants full screen and status bar settings in the 'interface builder' bit of Xcode 4.2.
Any suggestions? I'm ripping my hair out!
11-30-2011, 09:57 AM
#2 (permalink )
Registered Member
Join Date: Aug 2011
Location: Italy
Posts: 50
Maybe your views height is still 460, you should size them without the status bar metrics emulation.
11-30-2011, 10:03 AM
#3 (permalink )
Registered Member
Join Date: Nov 2011
Posts: 30
Quote:
Originally Posted by
keeshux
Maybe your views height is still 460, you should size them without the status bar metrics emulation.
Thanks for the suggestion, but nope, it's 480.
It is embedded in a tab bar controller and a nav controller, maybe it's something to do with those. So frustrating!
11-30-2011, 10:16 AM
#4 (permalink )
Registered Member
Join Date: Nov 2011
Posts: 30
Quote:
Originally Posted by
adamwaite
Thanks for the suggestion, but nope, it's 480.
It is embedded in a tab bar controller and a nav controller, maybe it's something to do with those. So frustrating!
I set the view as the root view controller and it was hidden properly. but when the tab bar controller was set as the root, it messed up again. So at least I know it's something to do with previous controllers and it can be fixed in interface builder somehow.
12-06-2011, 10:59 PM
#5 (permalink )
Registered Member
Join Date: Nov 2011
Posts: 30
Quote:
Originally Posted by
adamwaite
I set the view as the root view controller and it was hidden properly. but when the tab bar controller was set as the root, it messed up again. So at least I know it's something to do with previous controllers and it can be fixed in interface builder somehow.
SOLUTION-
Code:
self.navigationController.navigationBar.frame = CGRectOffset(self.navigationController.navigationBar.frame, 0.0, -20.0);
Put that in the view did load method on the first view controller your app sees. Finally a solution to this frustrating problem!!!!!
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Online Users: 402
16 members and 386 guests
AppsBlogger , chiataytuday , Clouds , David-T , dedeys78 , Duncan C , e2applets , EvilElf , iekei , ipodphone , leostc , LunarMoon , Murphy , sacha1996 , Sami Gh , teebee74
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,912
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55