我已经尝试将它放在我的代码的各个部分,比如在commitEditingStyle方法的末尾,但我无法让它停止编辑模式.基本上,我想在没有更多单元格的情况下自动退出编辑模式...
if ([self.tableView numberOfRowsInSection:0] ==0)
{
NSLog(@"this triggers, but doesn't stop editing..");
self.tableView.editing = NO;
[self.tableView endEditing:YES];
}
Run Code Online (Sandbox Code Playgroud) 我想做一些事情来回应某些UITableView动画的结束.例如,我希望表视图单元格在通过scrollToRowAtIndexPath滚动到之后突出显示(通过selectRowAtIndexPath).
如何才能做到这一点?
我想在动画结束后添加我的sliderButton,但这不起作用,它会在删除部分动画时添加按钮.
[coursesTable beginUpdates];
[coursesTable deleteSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationTop];
[coursesTable endUpdates];
[self.view addSubview:sliderButton];
Run Code Online (Sandbox Code Playgroud)
我有可能在动画结束时调用一个为我做这个的方法吗?