I am making an app in which i am using view based application.
My first view is a simple view controller class. there are some buttons in that view.
When i tap button , i want tableview.
so i am taking UITableViewController subclass.
what i am coin is
- (void)viewDidLoad
{
[super viewDidLoad];
NSBundle *bundle =[NSBundle mainBundle];
NSString *path = [bundle pathForResource:@"cases" ofType:@"plist"];
listfile = [[NSArray alloc ] initWithContentsOfFile:path];
[self loadView];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...
NSArray *temp = [listfile objectAtIndex:indexPath.row];
cell.textLabel.text = [temp objectAtIndex:0];
NSLog(@"Count : %@" , cell.textLabel.text);
return cell;
}
But, i can’t see any data . it shows blank table only.
I am doing anything wrong??
Thank you.
You should implement following methods in your
UITableViewController:And