내의 tableview을로드하고 잘 모르겠어요 때이 오류가 발생하는 이유 :에어설 션 실패 : forIndexPath
어설 션 실패 - [jQuery과 _configureCellForDisplay : forIndexPath :],/SourceCache/UIKit_Sim/UIKit - 3318.16.14/UITableView.m은 : 7344
내 스토리 보드에서 UITableViewController
을 추가 한 내가 셀을 설계 프로토 타입 셀을 사용하고 있습니다. 셀을 내 맞춤형 UITableViewCell
하위 클래스에 연결하고 해당 재사용 식별자를 "셀"로 설정했습니다. dequeueReusableCellWithIdentifier
을 cellForRowAtIndexPath
에 전화하면 어설 션 오류가 발생합니다. 필자가 읽은 것부터는 프로토 타입 셀에서 재사용 식별자를 설정하지 않은 경우에 발생하지만 셀 수없이 확인 했으므로 큐를 대기열에서 제외 할 때 사용한 식별자와 동일합니다. 당신은 주어진 reusablecellidentifier와 tableviewcell을 등록해야
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
LanguageSelectionTableViewCell *cell = (LanguageSelectionTableViewCell*)[self.tableView dequeueReusableCellWithIdentifier:@"Cell"];
return cell;
}
시도 난 그냥 – Sam
@Sam의 셀 식별자를 추가 보관 용 – thisiscrazy4
에 프로토 타입 셀에 "셀"라는 식별자를 추가 한 스토리 보드 – Sam