The main tab in IOS (with 5 views) switches to the Secondary tab, which contains five additional views:
-(void) Maketabbarhidden: (BOOL) Hide
{
if ([self. Roottabbarcontroller. View. subviews Count] < 2 ) {
return;
}
UIView *contentview;
if ([[Self]. Roottabbarcontroller . View . subviews objectatindex:0]iskindofclass: [Uitabbar class]]) {
Contentview = [self. Roottabbarcontroller. View. subviews objectatindex:1];
}Else {
Contentview = [self. Roottabbarcontroller. View. subviews objectatindex:0];
}
if (hide) {
Contentview. frame =self. Roottabbarcontroller. View. bounds;
}
Else {
Contentview. frame =cgrectmake(self. Roottabbarcontroller. View. bounds. Origin. x,
Self. Roottabbarcontroller. View. bounds. Origin. y,
Self. Roottabbarcontroller. View. bounds. size. width,
Self. Roottabbarcontroller. View. bounds. size. height - self. Roottabbarcontroller. TabBar. frame. size. height);
}
self. Roottabbarcontroller. TabBar . Hidden = hide;
}
An implementation of a tabbarcontroller switch to another tabbarcontroller in IOS