그래서 tableviewcell 내부에 가로로 스크롤 가능한 컬렉션 뷰를 표시하려고합니다. 내가 사용하는 코드는UITableViewCell 안에 UICollectionView를 추가하는 중 오류가 발생했습니다.
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
UICollectionViewController *cv = [self.storyboard instantiateViewControllerWithIdentifier:@"collectionViewID"];
cv.view.frame = cell.contentView.bounds;
[self addChildViewController:cv];
[cell.contentView addSubview:cv.view];
[cv didMoveToParentViewController:self];
return cell;
}
오류가 발생합니다. 개체를 사용할 수 없습니다. 누군가가 오류를 이해하는 데 도움을 주시면 고맙겠습니다.
나는 정확하고 ... – AJT
예 .. thats 목표 .. – AJT
왜 자기가 원하지 않는지 [cell addChildViewController : cv]; – MANN