开发者

Rearranging between sections in UITableView

I have a UITableView with 2 sections in it. I have enabled rearranging in my table view, but I have a strange problem.

I do not want the user to be able to rearrange rows between sections (I only want users to be able to rearrange rows within their section). If I try to drag a row from the first section to the second section, it will not allow me, which is what I want. If I drag a row from the second section to the first section, it WILL let me, which I do not want.

Is this a bug in Apple's frameworks or 开发者_如何学编程is this actually how it is supposed to behave, and how can I get the behaviour I want?

EDIT: I'm experiencing some inconsistencies here. Earlier I was unable to drag a row from the first to the second section but now I can. How do I disable rearranging between sections?


I'm not aware of a specific bug, but have you been overriding tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath: explicitly to check the section the row is being attempted to move into? Maybe you're not and the default behavior just happens to work one way and not the other?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜