title: UITableView not getting populated
body: <p>I have a peculiar problem. I created a normal Objective C class called SampleTable. I then extended UITableView instead of NSObject. Then in the initWithFrame constructor I initialized the table. I also made a NSMutableArray object for the datasource. I also conformed UITableViewDelegate and UITableViewDatasource. I have overridden the necessary methods also.</p>
  
  <p>Now I made an object of this class in another class, and added the object as a subview. The tableView is getting drawn according to the CGRectMake() coordinates I gave to the initWithFrame constructor. But it is not getting populated with the data. I don't know what the problem is.</p>
  
  <p>SampleTable.h</p>
  
  <pre><code> #import &lt;Foundation/Foundation.h&gt;
  
   @interface SampleTable : UITableView { 
  
      NSMutableArray *ItemArray; 
  
   } 
  
  @property (nonatomic,retain) NSMutableArray *ItemArray;
  
   -(NSMutableArray *) displayItemArray; 
  
  @end
  </code></pre>
  
  <p>SampleTable.m</p>
  
  <pre><code> #import "SampleTable.h"
  
   @implementation SampleTable
  
   @synthesize ItemArray;
  
   -(id)initWithFrame:(CGRect)frm {
  
       [super initWithFrame:frm];
  
       self.delegate=self;
  
       self.dataSource=self;
  
       [self reloadData];
  
       return self;
  
  }
  
   -(NSMutableArray *) displayItemArray { 
  
      if(ItemArray==nil) { 
  
         ItemArray=[[NSMutableArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",nil];
  
      }
  
    return ItemArray;
  
   }
  
   - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
   { 
  
       return 1; 
  
   }
  
     -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 
  
      return [ItemArray count];
  
  }
  
   -(UITableViewCell *)tableView: (UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath {
  
      static NSString *CellIdentifier = @"Cell"; 
  
      UITableViewCell *cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 
  
     if (cell==nil) {
  
     cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle    reuseIdentifier:CellIdentifier]; 
  
      [cell autorelease]; 
  
     } 
  
     NSString *temp=[self.ItemArray objectAtIndex:indexPath.row]; 
  
     cell.textLabel.text = temp; 
  
    return cell; 
  
  }
  
   - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 
  
     NSLog(@"didselect");
  
  }
  
   -(void) dealloc { 
  
       [ItemArray release];
  
       [super dealloc]; 
  
   }
  
    @end
  </code></pre>