Comments (5)
I might be able to implement this as well after my "drop on empty table area" enhancement is complete.
from between-kit.
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.
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.
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.
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)
- CGPoint delegate options where possible
- Abstract away geometric conversion from the coordinator
- Scroll UICollectionView when dragging in progress HOT 2
- Fix link in README
- Mailing list
- Submit PRs to notable iOS community repos
- iOS 8.3, 8.4, 9.0 testing
- Dragging from collections in collectionview cells HOT 2
- Custom UICollectionViewFlowLayouts
- More detail in StackOverflow answers
- Use OCMock -invokeBlock and invokeBlockWithArguments
- Update copyright notices with correct dates
- Improve CocoaPods quality estimate HOT 1
- tvOS, watchOS integration?
- Functional tests
- Consider removing numbering scheme from Use Cases
- How to scroll UITableView while dragging UITableViewCell? HOT 3
- Get drag events while dragging. HOT 4
- Typo in Docs/Usage.md
- How to deactivate/activate dragging functionality?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from between-kit.