Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple sections? #5

Open
virajrch opened this issue Apr 25, 2014 · 6 comments
Open

Support for multiple sections? #5

virajrch opened this issue Apr 25, 2014 · 6 comments

Comments

@virajrch
Copy link

Hello,

I want to be able to reorder cells within a particular section. As my tableview has multiple sections, I can't use this pod as it only allows 1 section per tableview. How can I achieve what I want?

Thanks

@hpique
Copy link
Owner

hpique commented Apr 25, 2014

Hi @virajrch. I might give this a look next week.

In case someone else wants to give it a go before that, HPReorderTableView must implement numberOfSectionsInTableView: to display multiple sections. And then changes to reorderCurrentRowToIndexPath might be required.

@jobsLee-lcj
Copy link

Yeah.I have the same problem.In my app, I want multiple sections and each section just has one row.Then I implement the numberOfSectionInTableView: to display multiple sections.But when I drag,it crash.Error as follows:

2014-08-04 21:21:07.043 HPReorderTableViewDemo[3311:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 4. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 1 moved out).'

@hakanw
Copy link

hakanw commented Sep 17, 2014

I also need this, took a long time until I figured out why my -(NSInteger)numberOfSections was never called...

@bobmoff
Copy link

bobmoff commented Dec 16, 2014

yes, me too. would love to see multiple sections supported ♥

@hpique
Copy link
Owner

hpique commented Dec 21, 2014

#12 appears to address this. Have you tried it?

@bobmoff
Copy link

bobmoff commented Dec 21, 2014

No, I have not. I moved to another solution based of http://www.raywenderlich.com/63089/cookbook-moving-table-view-cells-with-a-long-press-gesture

Thanks though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants