의 번호를 입력하지 않습니다 그러나 여기에 코드 여기표 섹션의 수와 행
이 섹션과있는 tableView의 행의 수의 번호를 입력하지 않은 수의 코드는 섹션 및 행 수를 나타냅니다. 섹션 코드의 행의
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
번호는
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"Cell is");
return 1;
}
셀은
- (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