오류 신호 SIGABRT NSInvalidArgumentException', 이유 : 'UICollectionView를 Null 이외의 레이아웃 매개 변수로 초기화해야합니다.' 있는 UITableViewCell이 모음집보기 SEGUE에 대한 스토리 보드 파일을 사용하여 UICollectionViewNSInvalidArgumentException ', 이유 :'UICollectionView를 Null 이외의 레이아웃 매개 변수로 초기화해야합니다. '
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIViewController *viewController;
switch (indexPath.row) {
case IMAGE:
viewController = [[[CollectionViewController alloc] init] autorelease];
[self.CollectionViewController registerClass:[UICollectionViewCell class]forCellWithReuseIdentifier:@"Cell"];
case PROCEDURAL:
viewController = [[[ProceduralExampleViewController alloc] init] autorelease];
break;
default:
viewController = [[[UIViewController alloc] init] autorelease];
}
[self.navigationController pushViewController:viewController animated:YES];
}
에게 표시되어야 누르면
. UICollectionView가 nil이 아닌 레이아웃 매개 변수를 사용하여 도움을
감사를 초기화해야이 오류를 해결하는 방법
.
: 컬렉션 뷰가 스토리 보드에 보관 유지되고있는 경우, 위의 코드가 같은 것을 읽을 것, 그래서
는 당신이
instantiateViewControllerWithIdentifier:
를 사용하여 스토리 보드에서 그것을 얻을 필요 : http://stackoverflow.com/questions/15270058/console-error-uicollectionview-must-be-initialized-with-a-non-nil-layout-parame –어떻게 UICollectionView를 종합하고 있습니까? – SK9
는 tableviewcontroller의 uicollectionview 속성을 IBOutlet이 아니라고 선언했습니다. – user1120133