title: Add group table view sections on iOS app?
body: <p>Okay, so I'm writing an iPhone application, and to load the data into the grouped table views, I created a data model:</p>
  
  <pre><code>DataModel.m
  
  #import "GeometryDataModel.h"
  
  @implementation GeometryDataModel
  @synthesize titleGeo =_titleGeo;
  
  -(id)initWithTitleGeo:(NSString *)titleGeo
  {
      if ((self = [super init])) {
          self.titleGeo = titleGeo;
      }
      return self;
  }@end
  </code></pre>
  
  <p>Then I continued to write a data table...</p>
  
  <pre><code>DataTable.m
  #import "GeometryTableData.h"
  #import "GeometryDataModel.h"
  
  @implementation GeometryTableData
  @synthesize dataGeo = _dataGeo;
  @synthesize thumbImageGeo = _thumbImageGeo;
  
  - (id)initWithTitleGeo:(NSString *)titleGeo thumbImageGeo:(UIImage *)thumbImageGeo {
      if ((self = [super init]))
      {
          self.dataGeo = [[GeometryDataModel alloc] initWithTitleGeo:titleGeo];
          self.thumbImageGeo = _thumbImageGeo;
      }
  
      return self;
  }
  @end
  </code></pre>
  
  <p>then I created a view controller to set it all up</p>
  
  <pre><code>ViewController.m
  
  #import "GeometryViewController.h"
  #import "GeometryTableData.h"
  #import "GeometryDataModel.h"
  
  
  
  
  @interface GeometryViewController ()
  
  @end
  
  @implementation GeometryViewController
  @synthesize geoCalculatorList = _geoCalculatorList;
  
  - (id)initWithStyle:(UITableViewStyle)style
  {
      self = [super initWithStyle:style];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
  
  
          [super viewDidLoad];
  
  
      // Uncomment the following line to preserve selection between presentations.
      // self.clearsSelectionOnViewWillAppear = NO;
  
      // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
      // self.navigationItem.rightBarButtonItem = self.editButtonItem;
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
  #warning Potentially incomplete method implementation.
      // Return the number of sections.
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return _geoCalculatorList.count;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *geoCell = [tableView dequeueReusableCellWithIdentifier:@"Geometry"];
      GeometryTableData *geoTableStuff = [self.geoCalculatorList objectAtIndex:indexPath.row];
      geoCell.textLabel.text = geoTableStuff.dataGeo.titleGeo;
      geoCell.imageView.image = geoTableStuff.thumbImageGeo;
      return geoCell;
  }
  
  #pragma mark - Table view delegate
  
  - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      // Navigation logic may go here. Create and push another view controller.
      /*
       &lt;#DetailViewController#&gt; *detailViewController = [[&lt;#DetailViewController#&gt; alloc] initWithNibName:@"&lt;#Nib name#&gt;" bundle:nil];
       // ...
       // Pass the selected object to the new view controller.
       [self.navigationController pushViewController:detailViewController animated:YES];
       */
  }
  
  @end
  </code></pre>
  
  <p>And then finally, in the AppDelegate.m file I implement it to the table:</p>
  
  <pre><code>sectionOne = [[TableData alloc] initWithTitle:@"A cell" thumbImage:[UIImage
       imageNamed:@"none.png"]];
  sectionTwo = [[TableData alloc] initWithTitle:@"Another separated cell" thumbImage:[UIImage
      imageNamed:@"none.png"]];
  
  NSMutableArray *TableData = [NSMutableArray arrayWithObjects:sectionOne,sectionTwo, nil];
  
  UITabBarController * tabController = (UITabBarController *) self.window.rootViewController;
  ViewController * algebraController = [tabController.viewControllers objectAtIndex:0];
  Controller.calculatorList = TableData;
  </code></pre>
  
  <p>My question is, how would I create sections in the grouped table view, say to put "sectionOne" and "sectionTwo" into different sections on the table using my current system?</p>
  
  <p>Thanks!!!</p>