简体   繁体   中英

Delete button uitableview cell; a bit jumpy?

When i set a table into editing mode and try to delete a cell, i am having issues with the "delete" button playing hide and see :)

When i tap on the "minus" symbol, the delete button pops in but seems to be a bit jumpy, have to try a few times to get an actual tap on the delete button. Am not sure what the reason is

Any suggestsions?

ps: I have edited this question. Previously it was in regard to swipe and delete, but i believe the problem is also with the regular delete.

Im just shooting in the dark as i have'nt seen your code.

if you are detecting swipe through the old touchesBegan: withEvent: touchesMoved:withEvent: approach,this might happen as you are touching the cell.

With the new UISwipeGestureRecognizer in iOS 4.0, you could handle the swipe so easily.

IMHO.add a member variable to your UITableView subclass as BOOL isDeleteButtonVisible and use UISwipeGestureRecognizer to detect the swipe,then in the make the button visible and set the member variable.

In the touchesBegan: withEvent: method,check the button visibility by checking the isDeleteButtonVisible member variable and hide it if it is visible.

Im just giving you some hints.

have you tried this on an actual device? I was thinking the same about my tableview. It was running in the simulator and it was really difficult to do the right gesture or to hit the button.

But on the device it felt like it should be.

若要显示删除按钮,请将tableView.editing属性设置为YES,并实现委托的editingStyleForRowAtIndexPath方法,并为每个单元格返回适当的编辑样式(无,插入或删除)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM