Git Product home page Git Product logo

Comments (5)

cvconover avatar cvconover commented on July 1, 2024

I might be able to implement this as well after my "drop on empty table area" enhancement is complete.

from between-kit.

SteveFortune avatar SteveFortune commented on July 1, 2024

Agreed that this is a much needed feature. My only concern is that if we have big tables, looping through all the above rows and their data delegate cslls might take ages.

What are your thoughts?

from between-kit.

SteveFortune avatar SteveFortune commented on July 1, 2024

Thats a good shout actually - if you you are using CoreData, you could just do some sort of batch update query to the persistent store and then reload the whole table.. ?

The other thing is that Table and Collection view both have this built in, in the form of editing and moving modes. There's not much point re-inventing this feature if it already exists and meets requirements.

from between-kit.

cvconover avatar cvconover commented on July 1, 2024

So it looks like this array method works the way I want it to work. I guess
if your array is very very large, it would be slow, but that won't be my
use case. 30 items is likely the upper end for me.

-(void) droppedOnSrcAtIndexPath:(NSIndexPath_) to
fromSrcIndexPath:(NSIndexPath_) from {
NSInteger fromRow = [from row];
NSInteger toRow = [to row];

NSMutableIndexSet *fromIndex = [[NSMutableIndexSet alloc] init];
[fromIndex addIndex:fromRow];

// [self.leftData exchangeObjectAtIndex:toRow

withObjectAtIndex:fromRow];
// use this method instead of the one above
[self.leftData moveObjectsAtIndexes:fromIndex toIndex:toRow];
}

I am going to update my fork with it but probably as an configurable option
so developer can choose between index swap and drop insert behavior. I'll
submit a pull request in case you want to include.

On Thu, Mar 13, 2014 at 4:54 AM, Steve Fortune [email protected]:

Agreed that this is a much needed feature. My only concern is that if we
have big tables, looping through all the above rows and their data delegate
cslls might take ages.

What are your thoughts?

Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-37524474
.

Lacrosse Stats Collection for the iPad - Get it on the App
Storehttp://itunes.apple.com/us/app/x-static-apps-lacrosse-stats/id516229459?ls=1&mt=8

from between-kit.

SteveFortune avatar SteveFortune commented on July 1, 2024

Ok - do raise a PR and I'll have a look. Admittedly the default UITableView moving look and feel isn't very customisable (at least that I'm aware of) so that might be a cool addition.

Having thought about it a bit more, if the dataset behind the TableView is very large then we could delegate reordering onto a concurrent background queue or something.. If you could raise a PR I'll see if a can do some POC around it.

from between-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.