我正在为一个表单使用quickdialog,我正在尝试实现swipe来删除,但我不知道我将如何做。有人能帮我吗?
发布于 2013-12-30 07:43:32
通过使用QSortingSection代替QSection并将canDeleteRows设置为YES,可以滑动删除截面中的元素。
QSortingSection *foosection = [[QSortingSection alloc] init];
foosection.canDeleteRows = YES;像往常一样继续添加元素,您应该能够滑动每个元素以显示“删除”按钮。点击delete按钮后,该项目将自动从部分中消失。
发布于 2013-04-09 07:29:02
答案是我认为是How to detect Swipe Gesture in iPhone SDK?的组合:
而且,你真正担心的可能是如何Add/remove new QElement to the section (从github的问题)。
后者建议从节中删除元素的方法如下:
[self.extraRepaySection.elements removeObject:self.extraRepayAmount];
[self.quickDialogTableView reloadSections:[NSIndexSet indexSetWithIndex:2] withRowAnimation:UITableViewRowAnimationFade];https://stackoverflow.com/questions/14548940
复制相似问题