Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView+UINavigationBar+UITabbar in windows based application template using interface Builder?

i want a view with UITabBAr at The bottom with some buttons+Navigation controller on each view and a tableview inside the view using interface builder and windows basaed application template. i want a step by step guide to do this

like image 401
Rahul Vyas Avatar asked Mar 13 '26 21:03

Rahul Vyas


1 Answers

This is very simple. Just create your appdelegate with this function:

- (void)applicationDidFinishLaunching {

  TableSubclass *tvc = [[TableSubclass alloc] init];  //subclass of UITableView you declare

  UINavigationController *navBar = [[UINavigationController alloc] initWithRootViewController:tvc];
  navBar.tabBarItem.title = @"Foo";

  NSArray *tabViewControllerArray = [NSArray arrayWithObjects:navBar, nil];
  self.tabBarController.viewControllers = tabViewControllerArray;
  self.tabBarController.delegate = self;

  [tvc release];

}

Now, just create your UITableView subclass and you are all set.

If you want multiple views, and not just one table, you can just declare more view controllers and add them to the tabViewControllerArray.

like image 146
Andrew Johnson Avatar answered Mar 16 '26 11:03

Andrew Johnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!