0

I want to use a custom UITabBar in my iOS app, with a button just above it to hide/minimise and show/restore it. I used a custom Tab bar from here but i couldnt get it to woek. I added a button in ViewDidLoad of a UINavigationController subclass and added a target selector to hide/show the tab bar in all views but i want that selector to be used everywhere in the app. Is such a Tab bar even possible? Any suggestions?

Charles
  • 50,943
  • 13
  • 104
  • 142
Akash Malhotra
  • 1,106
  • 1
  • 17
  • 30
  • Solved through this [link][1] ...works great :) [1]: http://stackoverflow.com/questions/5272290/how-to-hide-uitabbarcontroller – Akash Malhotra Jun 20 '12 at 12:57

1 Answers1

0
UIview *tabView=[UIview alloc]initwitFrame:CGRectMake(0,260,320,60)];

UIButton *btn=[UIButton alloc]initWithFrame:CGRectMake(0,0,50,20)];
[btn setTitle:@"SHOW/HIDE"];
you can add Target to your btn here...
[btn addTarget:self action:@selector(showNHide:) forControlEvents:UIControlEventTouchUpInside];
[tabView addSubView:btn];
[youTabbar setFrame:CGRectMake(0,20,320,40)];
[tabView addSubView:yourTabbar];

then add whole view into your view [ self.view addSubView:tabView];

then in your showNHide method you can code for Animation of that... This is not perfect answer but i hope this will give you some idea

Anand
  • 1,129
  • 7
  • 29