objective c - UITableView Delete Control and Delete Button not synced -


i have seen strange behavior of table view: have enabled uitablevieweditingstyledelete, shows in editing mode @ left side of tableview red "-" control. if tap on control, delete button @ right side appears , "-" control turned. okay, if several times, "-" control horizontal, delete button visible: enter image description here

has may refreshing tableview? should disable them in editing mode?

had seen similar or has idea how resolve it?

update 05/20/13: check in each nsfetchedresultcontrollerdelegate callback, if tableview in editing , if yes, don't update tableview, fix bug. when tableview returns editing in normal mode, call [tableview reloaddata] tableview date , contains newest information.

but destroys animation. has idea, how can update tableview without losing animation? problem is, tableview doesn't know did happen while in edit mode.

thank help!

linard

the loss of animation 1 part of deactivating updates in edit mode. other thing is, if add or delete 1 row in edit mode, have implement [tableview reloaddata] to. think better solution is, deactivate cell content updates through nsfetchedresultcontroller. content changes in table often, that's not important while editing cell. , if table able add or delete cells, not deactivated, tableview rows , sections remain updated, need update rows @ end of editing mode instead of entire tableview [tableview reloaddata]. solution have animations, no additional update code tableview while inserting or deleting row , @ end of edit mode have no trouble update tableview state of coreplot data.

update: after playing around, saw, bug appears same way before, not often. think problem is, [tableview beginupdates] , [tableview endupdates] called same way before , may cause bug. have no changed [tableview reloaddata] , have no deactivated updates during editing, because that's way i've found until works (even if lose animations).

if has additional idea or improvements, please let me know.

linard


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -