Я создаю приложение, в котором я использую приложение на основе представления.
Мой первый взгляд - это простой класс контроллеров представления. в этом представлении есть несколько кнопок.
Когда я нажимаю кнопку, я хочу просмотреть таблицу.
поэтому я беру UITableViewController подкласс.
что я за монета
- (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;
}
Но я не вижу никаких данных. это показывает только пустую таблицу.
Я делаю что-то не так ??
Спасибо.