Я использую Tableview, но это не входит в число секций и количество строк в Tableview здесь кодТаблица не входит в число секций и число строк
здесь код для числа разделов и количества строк.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
Количество строк в коде Разделы
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"Cell is");
return 1;
}
Cell Values
- (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] autorelease];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
}
MultipleDetailViewsWithNavigatorAppDelegate *appDelegate = (MultipleDetailViewsWithNavigatorAppDelegate *)[[UIApplication sharedApplication] delegate];
cell.textLabel.font=[UIFont fontWithName:@"Helvetica" size:16];
cell.textLabel.textAlignment=UITextAlignmentLeft;
PublishData *theCellData = [appDelegate.publishArray objectAtIndex:indexPath.row];
NSLog(@"Cell is");
cell.textLabel.text [email protected]"Test";
return cell;
}
Скорее всего, вы не подключили выход делегата (если вы используете UIBuilder). И об исходном коде: вам лучше указать заголовок здесь, а не реализацию: ошибка либо в заголовке (возможно, в блоке расширения в исходном файле), либо в UIBuilder – makaron
Установите источник данных и делегируйте PLS – amar
self.tableView.delegate = самостоятельно; self.tableView.dataSource = self; – pbibergal