ios - Hiding tabBar showing black bar in Ios7 -


i using code hide tabbar:

self.tabbarcontroller.tabbar.hidden=yes; 

i hiding tabbarcontroller in project.but showing black bar in bottom of view in ios7.when go same view looking good.any appreciated.

note: solution ios6 , 7 only.

in ios 7 extend clickable area , hide black bar on place of hidden uitabbar should enable 'extend edges - under opaque bars' option uiviewcontroller.

extend edges - under opaque bars option

or can set property programmatically:

[self setextendedlayoutincludesopaquebars:yes]

here example of code hide or move tabbar ios 6/7:

uitabbarcontroller *bar = [self tabbarcontroller]; if ([self respondstoselector:@selector(setextendedlayoutincludesopaquebars:)]) {     //ios 7 - hide property     nslog(@"ios 7");     [self setextendedlayoutincludesopaquebars:yes];     bar.tabbar.hidden = yes; } else {     //ios 6 - move tabbar off screen     nslog(@"ios 6");     cgrect screenrect = [[uiscreen mainscreen] bounds];     float height = screenrect.size.height;     [self movetabbartoposition:height]; }  //moving tab bar , subviews offscreen top @ position y -(void)movetabbartoposition:(int)y {      self.tabbarcontroller.tabbar.frame = cgrectmake(self.tabbarcontroller.tabbar.frame.origin.x, y, self.tabbarcontroller.tabbar.frame.size.width, self.tabbarcontroller.tabbar.frame.size.height);      for(uiview *view in self.tabbarcontroller.view.subviews) {         if ([view iskindofclass:[uitabbar class]]) {             [view setframe:cgrectmake(view.frame.origin.x, y, view.frame.size.width, view.frame.size.height)];         } else {             [view setframe:cgrectmake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, y)];             view.backgroundcolor = [uicolor blackcolor];         }     } } 

function moving tab bar offscreen got this post.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -