레이블이 포함 된 사용자 정의 셀을 만들었지 만 표시되지 않는 것보다 내 표보기에 추가했을 때 내보기 컨트롤러가 TableViewController
IB를 사용하여 표보기를 설정하고 해당 표를 설정했습니다 델리게이트 및 데이터 소스 올바르게.내 사용자 정의 셀이 표시되지 않습니다
나는 이것을하고있는 중이 야 : tableView:numberOfRowsInSection
방법으로 설정 얼마나 많은 행
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
ExampleAppDataObject* theDataObject = [self theAppDataObject];
return theDataObject.myAudio.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
ExampleAppDataObject* theDataObject = [self theAppDataObject];
NSString *destinationPath = [theDataObject.myAudio objectAtIndex:indexPath.row];
NSArray *parts = [destinationPath componentsSeparatedByString:@"/"];
NSString *filename = [parts lastObject];
AudioInfoCell *cell = (AudioInfoCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[AudioInfoCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier];
}
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.audioName.text = filename;
return cell;
}
은 numberOfSectionsInTableView를 수행하고있는 tableView는 : numberOfRowsInSection : 방법은 바로 숫자를 반환? – Julien
코드 tableView : numberOfRowsInSection –
코드를 사용하여 메서드를 게시하십시오. tableView – Rajneesh071