CBTableViewDataSource
CBTableViewDataSource copied to clipboard
cell的点击事件,怎么使用
你好,问一哈,cell的点击事件,怎么使用,多谢
可以使用event设置点击事件,如下:
section.event(^(NSUInteger index,id row) {
CustomViewController * controller = [CustomViewController new];
controller.viewModel.data = row;
[self.navigationController pushViewController:controller animated:YES];
});
需要注意的是,event是针对section的,参数index表示点击的cell在该section下的下标,而row表示当前下标的数据。
恩