title: Switch page in UITableView
body: <p>i Used SWRevealViewController this Source to make my app,
  But i don't know why i cant switch the page when i press my tableview cell item,
  did anyone help me to fix my problem?</p>
  
  <p>here is my .m file:
  i try mane method,but still didn't work...</p>
  
  <pre><code>    #import "RevealTableViewController.h"
      #import "SWRevealViewController.h"
      #import "PhotoViewController.h"
  
      @interface RevealTableViewController ()
  
      @end
  
      @implementation RevealTableViewController  {
          NSMutableArray *menuItems;
          NSMutableArray *detailitemlist;
      }
  
      - (void)viewDidLoad {
          [super viewDidLoad];
  
          menuItems = [[NSMutableArray alloc] init];
          [menuItems addObject:@"CART"];
          [menuItems addObject:@"WISHLIST"];
  
          detailitemlist = [[NSMutableArray alloc]init];
          [detailitemlist addObject:@"NEW ARRIVALS"];
          [detailitemlist addObject:@"BRANDS"];
          [detailitemlist addObject:@"CLOTHING"];
  
      }
  
      - (void)didReceiveMemoryWarning {
          [super didReceiveMemoryWarning];
          // Dispose of any resources that can be recreated.
      }
  
      #pragma mark - Table view data source
  
      - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  
          return 2;
      }
  
      - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  
          NSInteger n = 0 ;
          switch (section) {
              case 0:
                  n = [menuItems count];
                  break;
  
              case 1:
                  n = [detailitemlist count];
                  break;
          }
          return n;
      }
  
  
      - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
      {
          NSString *sectionName;
          switch (section)
          {
              case 1:
                  sectionName =@"   CATEGORIES";
                  break;
          }
          return sectionName;
      }
  
  
      - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
          if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
              [tableView setSeparatorInset:UIEdgeInsetsZero];
          }
          if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
              [tableView setLayoutMargins:UIEdgeInsetsZero];
          }
  
          static NSString *indictor = @"Cell";
          UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indictor];
  
  
          if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
              [cell setLayoutMargins:UIEdgeInsetsZero];
          }
  
          if (cell == nil){
              cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indictor];
  
          }
          switch (indexPath.section) {
              case 0:
                  cell.textLabel.text = [menuItems objectAtIndex:indexPath.row];
                  break;
  
              case 1:
                  cell.textLabel.text = [detailitemlist objectAtIndex:indexPath.row];
                  break;
          }
          return cell;
  
          }
      #pragma mark - Navigation
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
      NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
      UINavigationController *destViewController = (UINavigationController*)segue.destinationViewController;
      destViewController.title = [[menuItems objectAtIndex:indexPath.row] capitalizedString];
  
  
      if ([segue.identifier isEqualToString:@"showPhoto"]) {
          UINavigationController *navController = segue.destinationViewController;
          PhotoViewController *photoController = [navController childViewControllers].firstObject;
          NSString *photoFilename = [NSString stringWithFormat:@"%@_photo", [menuItems objectAtIndex:indexPath.row]];
          photoController.photoFilename = photoFilename;
      }
  }
  
      @end
  </code></pre>
  
  <p>and here is my app image...
  <img src="https://i.stack.imgur.com/ULrud.png" alt="enter image description here"></p>