1つの動的セクションで静的なテーブルビューを定義したい これは可能ですか?「静的セル」を含む静的なTableviewに「ダイナミックプロトタイプ」を含むセクションを含める
セクション0は静的で、lcodeはアウトレットとxcodeで配線されています。
部1は、動的
ものでなければならない私はこれを試してみましたが、私は、静的な部分のために返還しなければ何のセルを知っているドント。
static NSString *CellIdentifier = @"ItemCellBasic";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
switch (indexPath.section)
{ case 0:
return // I don´t know what
case 1:
cell.textLabel [email protected]"dynamic";
return cell;
}
EDIT 1;
case 0: return [super tableView:tableView cellForRowAtIndexPath:indexPath];
をしかし得た: は今、私が試した
*** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableView.m:6072
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
プロパティ:xcodeの "content"は "静的セル"または "ダイナミックプロトタイプ"です。 – mica