andreamazz / SlideOutNavigation

SlideOut Navigation Controller for iOS.
MIT License
210 stars 49 forks source link

How to remove the status bar (in IOS7) ? #47

Closed iesta closed 10 years ago

iesta commented 11 years ago

I added this to the end of AMSlideOutNavigationController.m :

  - (BOOL)prefersStatusBarHidden  {  return YES; }

That removes the status bar in the children views but not in the slideout menu.

Do you know a way to remove it everywhere ?

andreamazz commented 11 years ago

You can add a new property in your app's plist, named View controller-based status bar appearanceand set it to NO. You can then show or hide the status bar like this:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
iesta commented 11 years ago

Thank you but it's not working for me (ipad app, xcode 5).

I have tried many things... but cannot find a solution...

andreamazz commented 11 years ago

Hi @iesta, sorry for the delay. I tried to hide the status bar using

  - (BOOL)prefersStatusBarHidden  {  return YES; }

or the method described above. The status bar disappears, you only need to adjust the Y offset in the slide menu with this option:

          AMOptionsTableOffestY: @0,
iesta commented 11 years ago

Thank you but i still have a bar in the menu. https://dl.dropboxusercontent.com/s/ssz8oyq6n5518p2/2013-10-04%20at%2016.41.png

Greetings :-)

andreamazz commented 11 years ago

That looks like an empty header. With version 1.6 I made a small change in the header handling If you don't want a section header, instead of an empty string, pass nil to its title, like this:

[self.slideoutController addSectionWithTitle:nil];

This should remove that gap in the top.

andreamazz commented 11 years ago

Hi @iesta, any luck in hiding that header?

iesta commented 11 years ago

No :( I am pretty sure it is the statusbar. I will make some more tests...

donaciano commented 10 years ago

Did you ever get this cleared up? How about trying AMOptionsTableOffsetY : @100,

This will push the header down by 100 points and verify beyond a doubt that you're really looking at a status bar and not a header.

If you still have it up top, then it's definitely not a header and something weird is going on. On the other hand, if it scoots down you need to verify that you're setting up your sections with a title of nil and not @"". When I set up the initial section (which you have to do) which I don't want to show up, if I use @"" for it's title I get a similar effect to what your screenshot shows. nil makes it go away entirely. Be careful that you're not only updating the iOS 6.0 options and then testing in iOS 7.0 (or vice-versa), I've made that mistake myself and wondered why the menu wasn't changing as I expected. There's two sets of options in the Sample app and it's easy to just kind of skim over them and not update things twice.

Please try out the option above and just verify that it is the statusbar you're seeing and we can figure out what heisenbug you may have found. ;-) I am really curious if the statusbar is somehow getting around the option to hide it so I'd like to get to the bottom of this one.

iesta commented 10 years ago

That was it :-) I am sorry i couldn't test that ealier but my client was making a lot of changes and i was quite busy... Thank you very much

andreamazz commented 10 years ago

Glad to hear that. Thanks @donaciano for your help.

donaciano commented 10 years ago

@andreamazz The open issue on the sidebar was bugging me. 8)