问题
I have an iOS4 iPad app that I'm upgrading to iOS5, and there is one issue that I don't fully understand what is going on.
The view in question uses a UITableView
with a number of subclassed UITableViewCells
to display a series of different (and modifiable) fields. Each cell contains UI buttons, UITextFields
, etc etc, and is used to readily store a variable amount of controls.
Via tableView:canMoveRowAtIndexPath:
we've enabled the ability for the user to rearrange the order of the rows using drag-and-drop. It worked perfectly in iOS4, but as of iOS5 has ceased to function properly. A simple swap leaves the moved cell's text fields looking disabled (without their white background), and subsidiary cells further down can become 'bugged', vanishing from the screen in an unpredictable manner -- leaving white spaces where they should be.
What changed between iOS4 and iOS5 that causes this issue, and how can I correct it?
回答1:
as of iOS 5, you must also implement tableView:moveRowAtIndexPath:toIndexPath:
to enable reordering; are you doing this?
来源:https://stackoverflow.com/questions/9571630/rearranging-uitableviewcells-causes-cell-contents-to-break