自己寫了XXXCell.h .m .xib
注冊(cè)UITableView時(shí)贮泞,寫了
[table registerNib:[UINib nibWithNibName:cellName bundle:nil] forCellReuseIdentifier:cellName];
cellForRowAtIndexPath中寫了:
XXXCell *cell = [tableView dequeueReusableCellWithIdentifier: cellIdentifier forIndexPath:indexPath];
發(fā)現(xiàn)問題有時(shí)候點(diǎn)擊cell沒反應(yīng)膊毁;全選的時(shí)候有時(shí)會(huì)空出幾行沒有選到。
現(xiàn)在去掉
[table registerNib:[UINib nibWithNibName:cellName bundle:nil] forCellReuseIdentifier:cellName];
cellForRowAtIndexPath中改為:
static NSString * cellIdentifier = @"XXXCell";
XXXCell *cell = (XXXCell *)[tableView dequeueReusableCellWithIdentifier: cellIdentifier];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed: cellIdentifier owner:self options:nil] lastObject];
}
問題就解決了伪朽。原因未知待調(diào)查涩堤。