title: How to use push view navigation programmatically?
body: <p>I have following 4 view controllers:</p>
  
  <ol>
  <li>Home</li>
  <li>Groups</li>
  <li>Items</li>
  <li>Details</li>
  </ol>
  
  <p>I am using modal view navigation for 'Home -> Groups' and 'Groups -> Items'. Now, I want to use push view controller for 'Items -> Details'. Because, I am passing group id for 'Groups -> Items' to display group specific items. So, 'Items' is dynamic. I do not want to reproduce 'Items' for 'Details -> Items' for back to items from details.</p>
  
  <p>How can I achieve it?</p>
  
  <p>EDIT</p>
  
  <p>Here is code to display items page:</p>
  
  <pre><code>@implementation RpFoodList
  @synthesize gid;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      [self loadFoodList];
  }
  
  - (void) loadFoodList
  {
      RpDb *rpDb = [[RpDb alloc] init];
  
      int groupID = [self gid];
  
      UIImage *iconLeft = [UIImage imageNamed:@"arrow_left.png"];
      UIImage *iconLeftH = [UIImage imageNamed:@"arrow_left_h.png"];
      UIButton *btnLeft;
      UIButton *button;
      UILabel *sep;
  
      int bulletWidth = 40;
      int rowHeight = 32;
  
      NSMutableArray *foods = [rpDb getGroupFoods:groupID];
  
      [groupTitle setText:[NSString stringWithFormat:@"Group Details (%d)", [foods count]]];
  
      int counter = 0;
      int contentSize = 0;
  
      for(NSMutableDictionary *food in foods)
      {        
          NSNumber *foodID = [food valueForKey:@"foodID"];
          int tag = [foodID intValue];
          NSNumber *groupID = [food valueForKey:@"groupID"];
          NSString *foodName = [food valueForKey:@"foodName"];
          NSString *foodNameAr = [food valueForKey:@"foodNameAr"];
  
          btnLeft = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
          btnLeft.frame = CGRectMake(0, rowHeight*counter+1, bulletWidth, rowHeight);
          [btnLeft setImage:iconLeft forState:UIControlStateNormal];
          [btnLeft setImage:iconLeftH forState:UIControlStateHighlighted];
          [btnLeft addTarget:self action:@selector(showFoodDetails:) forControlEvents:UIControlEventTouchUpInside];
          btnLeft.tag = tag;
  
          button = [UIButton buttonWithType:UIButtonTypeCustom];
          button.frame = CGRectMake(bulletWidth, rowHeight*counter+1, self.view.frame.size.width-bulletWidth, rowHeight);
          [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
          [button setTitle:foodNameAr forState:UIControlStateNormal];
          button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
          button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 10);
  
          counter++;
  
          contentSize += rowHeight + 1;
  
          sep = [[UILabel alloc] init];
          [sep setFrame:CGRectMake(0, rowHeight*counter+1, self.view.frame.size.width, 1)];
          [sep setBackgroundColor: [UIColor lightGrayColor]];
  
          [scrollView addSubview:button];
          [scrollView addSubview:btnLeft];
          [scrollView addSubview:sep];
      }
  
      scrollView.contentSize = CGSizeMake(self.view.frame.size.width, contentSize);
  
  }
  
  - (IBAction)showFoodDetails:(id)sender
  {
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
      RpFoodDetails *foodDetails = (RpFoodDetails*)[storyboard instantiateViewControllerWithIdentifier:@"RpFoodDetails"];
      foodDetails.fid = [sender tag];
      foodDetails.gid = [self gid];
      [self presentModalViewController:foodDetails animated:YES];
  }
  </code></pre>