Code Monkey home page Code Monkey logo

draganddroptableview's Introduction

Indigo Minimalist Jekyll Template - Demo · Build Status

This is a simple and minimalist template for Jekyll for those who likes to eat noodles.


What has inside? | Setup? | Settings | How to | Tests | Donate | Problems

What has inside?

Setup

  1. ⭐ to the project. 🤘
  2. Install Jekyll, NodeJS and Bundler.
  3. Fork the project Indigo
  4. Edit _config.yml with your data.
  5. bundle install
  6. npm i && npm i -g gulp
  7. gulp
  8. open in your browser: http://localhost:3000

Settings

You must fill some informations on _config.yml to customize your site.

name: John Doe
bio: 'A Man who travels the world eating noodles'
picture: 'assets/images/profile.jpg'
...

and lot of other options, like width, projects, pages, read-time, tags, related posts, animations, multiple-authors, etc.

How to:

Create posts:

You can use the initpost.sh to create your new posts. Just follow the command:

./initpost.sh -c Post Title

The new file will be created at _posts with this format date-title.md.

Tests

You can test your app with:

npm run test
# or
bundle exec htmlproof ./_site

Donate

If you liked my work, buy me a coffee <3

paypal

Problems?

Tell me on github or open a issue.

Inspirations:


MIT License © Sérgio Kopplin

draganddroptableview's People

Contributors

d-32 avatar grillbiff avatar olejnjak avatar postmechanical avatar snowyote avatar taberrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

draganddroptableview's Issues

Crash app when drop.

Hello @grillbiff
At my code, there are many changes insert/delete action to tableview while dragging (background processing).

I used [UITableView beginUpdate and endUpdate], and added NSLock lock] before beginUpdate, end unLock after endUpdate to prevent crash.

But your code call reloadData after release press,
So, my app crashes sometimes.
Can you avoid using reloadData?

After drop,I think, it is not needed to call reloadData , or if need, it may be replaced by insert/deleteRows nested by begin/endUpdate.

I have added a crash callstack screenshot.

screen shot 2015-11-23 at 8 49 13 pm

Thank you.

Cell cann't move to 0th section

moveRowAtIndexPath isn't called when moving some row to 0th section which doesn't have any row at the moment!! You demo project doesn't allow showing a section at zeroth position which doesn't have any row.

Method not found

Hi,

In the method forwardInvocation, you assume that my class had implemented 'numberOfSectionsInTableView:' which is not mandatory.
If the method is not defined, you have to assume 1.

Regards,
Marce.

-(void)forwardInvocation:(NSInvocation *)invocation {
if (!_proxyObject) {
[self doesNotRecognizeSelector: [invocation selector]];
}
[invocation invokeWithTarget:_proxyObject];
}

(lldb) po invocation
<NSInvocation: 0x16d51f10>
return value: {i} 0
target: {@} 0x1eb8e0c0
selector: {:} numberOfSectionsInTableView:
argument 2: {@} 0x173a0a00

.dataSource and .delegates cause retain cycle

Hi,

I like your implementation but I found a big problem.

I found a retain cycle with your DND table, this methods retain my object (the delegate) and it produce a retain cycle. They shouldn't.

-(void)setDataSource:(id)dataSource and
-(void)setDelegate:(id)delegate

When the owner of my object releases it, my object doesn't die.
I had to call a method which I called willDealloc, in order to put this code and break the cycle.

_tableView.dataSource = nil;
_tableView.delegate = nil;

Regards,
Marce.

PD: If the table has more than one section, moving a cell through sections, produce a crash.
PD: My project is non-ARC.

ios 9 reloaddata problem

Hi,

Thanks for the great library. I recently came across an issue while testing ios9 in my app where reloadData no longer works after asynchronously fetching data from my server (my datasource methods are not called) - you can read more details here https://forums.developer.apple.com/message/41228#41228.

I don't think it has anything to do with DragAndDropTableView but I thought I would check if you'd tried it on ios9 and whether you had run into any issues.

Thanks!
-Patrick

Crash when adding a cell to an empty table

Not sure if what I wrote in the headline is the cause but this is the symptom.

When the UItableView is empty, and I insertRowsAtIndexPaths I get the following crash:

*** Assertion failure in -[DragAndDropTableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-3347.44/UITableView.m:1623

I switched back to regular UITableView (to see if DragAndDrop is the problem) - it works :( so it's definitely something with DragAndDrop...

The code:

    ChapterDataItem *item = [[ChapterDataItem alloc] init];
    item.type = @"text";
        dispatch_async(dispatch_get_main_queue(), ^{
            [chaptersArray addObject:item]; //add object should be on the same thread for consistency of the data
            NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:[chaptersArray count]-1 inSection:0];
            [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
        });

The number of rows returns the correct number of cells (nothing fishy here)

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if (section == 0)
    {
        return [chaptersArray count];
    }
}

Any help will be appreciated...

Drag a cell to a non authorized section

First of all - Awesome package. Thanks a lot!

I have section 0 that allows reordering of cells. Section 1 - doesn't allow.
The thing is when the user drags a cell "too low" (his intention is to set it the last cell in section 0 but he "misses")
I get a crash:

*** Assertion failure in -[DragAndDropTableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-3347.44/UITableView.m:1623
2015-06-09 09:44:52.725 Cookila copy[23234:619162] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (2) must be equal to the number of rows contained in that section before the update (2), 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).'

How can I avoid it without getting all the sections in the swap game

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.