我有一个 UITableView 和一些具有不同表格视图样式的 .xib。每个 .xib 都有它自己的类,并使用基于该部分的重用标识符进行注册。例如:在我的 viewDidLoad 我有以下内容:
UINib *cellStyleOne = [UINib nibWithNibName:@"CellStyleOne" bundle:nil];
[self.tableView registerNib:cellStyleOne forCellReuseIdentifier:@"CellStyleOne"];
UINib *cellStyleTwo = [UINib nibWithNibName:@"CellStyleTwo" bundle:nil];
[self.tableView registerNib:cellStyleTwo forCellReuseIdentifier:@"CellStyleTwo"];
UINib *cellStyleThree = [UINib nibWithNibName:@"CellStyleThree" bundle:nil];
[self.tableView registerNib:cellStyleThree forCellReuseIdentifier:@"CellStyleThree"];
我如何将这些重用标识符中的每一个分配给我的 cellForRowAtIndexPath 中的一部分单元格而不引起任何问题?
谢谢。