Los UIViewControllers que se inserta en la pila de navegación puede hacer algo similar a lo siguiente:
- (void)viewWillAppear:(BOOL)animated {
self.tabBarController.tabBar.hidden = NO; // Or YES as desired.
}
EDITAR: se agregó el código adicional belo w para tratar con el marco. No creo que recomiende esta idea en particular ya que depende de la estructura de vista predeterminada interna de un UITabBarController.
Definir la siguiente categoría en UITabBarController:
@interface UITabBarController (Extras)
- (void)showTabBar:(BOOL)show;
@end
@implementation UITabBarController (Extras)
- (void)showTabBar:(BOOL)show {
UITabBar* tabBar = self.tabBar;
if (show != tabBar.hidden)
return;
// This relies on the fact that the content view is the first subview
// in a UITabBarController's normal view, and so is fragile in the face
// of updates to UIKit.
UIView* subview = [self.view.subviews objectAtIndex:0];
CGRect frame = subview.frame;
if (show) {
frame.size.height -= tabBar.frame.size.height;
} else {
frame.size.height += tabBar.frame.size.height;
}
subview.frame = frame;
tabBar.hidden = !show;
}
@end
Entonces, en lugar de utilizar el cambio tabBar.hidden me sugirió originalmente, haga lo siguiente:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tabBarController showTabBar:NO];
}
Obviamente asegurándose de que la aplicación tiene incluyó la definición de categoría para que se conozca 'showTabBar'.
muchas gracias ... es realmente muy útil para mí ... es casi mes final de búsqueda ... – Hiren