我可以很容易地获得单元格的引用
cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
但在编辑/重新排序模式下,我需要获取对单元格右侧小 handle 的引用。我怎样才能做到这一点?
最佳答案
用这段代码就可以找到它,但是reorder-control是private-api
for (UIView *view in cell.subviews) {
if ([NSStringFromClass([view class]) isEqualToString:@"UITableViewCellReorderControl"]) {
// 'view' is the reorder control
}
}
关于ios - UITableViewCell - 如何获取指向重新排序控件的指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14338529/