Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Switch Views in Tab Bar Applications XCODE

  1. #1
    Default Switch Views in Tab Bar Applications XCODE
    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!

  2. #2
    nobody? please, i really need help!

  3. #3
    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]];

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •