User Tag List

  1. Maxner's Avatar
    I would like to Switch Views in a Tab Bar app, not by klicking on the tab bar, but with a regular button like in the screenshot:

    Ive tried it with several methods and it didnt work, please help!
    2011-05-26 09:03 PM
  2. Maxner's Avatar
    nobody? please, i really need help!
    2011-05-28 01:14 PM
  3. masbog's Avatar
    define view controller one by one, and then save all into NSArray, like this...

    feedViewController *feed = [[feedViewController alloc] initWithNibName:@"feedViewController" bundle:nil];
    instagramViewController *insta = [[instagramViewController alloc] initWithNibName:@"instagramViewController" bundle:nil];
    twitViewController *twit = [[twitViewController alloc] initWithNibName:@"twitViewController" bundle:nil];
    pimpViewController *pimp = [[pimpViewController alloc] initWithNibName:@"pimpViewController" bundle:nil];

    viewControllers = [[NSArray alloc] initWithObjects:feed, insta, twit, pimp,nil]; //define NSArray in header
    and then on button click set self.viewController = [viewController objectAtIndex]; //where viewcontroller you want to use
    so [self.view addSubview:[[viewController objectAtIndex] view]];
    2011-12-19 07:38 PM