title: How to add submenu's in table view in ios
body: <p>i don no whether this question asked or not but i still searching for an answer.Am working in tableview concept and i am creating a table view like with some set of menu's like inbox, sent,setting etc.Now what i want is i want to create sub menu's inside every menu, for example if i click inbox it should show new,replied,deleted etc like this for every main menu i want to create sub menu. Using array we can load by checking section but with out using array i want to create directly and notable one i have used custom cell i also want to show images as per the menu if it is inbox i have to show inbox image. Could any one help me??</p>
  
  <pre><code>    -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 8;
  }
  
  -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return 8;
  
  }
  
  -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      static NSString *cellidentifier=@"ViewProfileCell";
  
      MyHomeViewCell *cell= [[MyHomeViewCell alloc] init];
  
      cell=(MyHomeViewCell*)[tableView dequeueReusableCellWithIdentifier:cellidentifier];
  
      if(!cell)
      {
  NSArray *nibofMyHomeCell=[[NSBundle mainBundle]loadNibNamed:@"MyHomeViewCell" owner:self options:Nil];
          cell=[nibofMyHomeCell objectAtIndex:0];
  
  
      }
  
      if(indexPath.section==0)
      {
          cell.MyHomeMenuLabel.text=@"Inbox";
      }
  
  
  
  }
  </code></pre>