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

How to use insertItemsAtIndexes:inParent:withAnimation (bug?) #248

Open
limura opened this issue Dec 16, 2017 · 0 comments
Open

How to use insertItemsAtIndexes:inParent:withAnimation (bug?) #248

limura opened this issue Dec 16, 2017 · 0 comments

Comments

@limura
Copy link

limura commented Dec 16, 2017

Thank you for a wonderful library.
I am working very well in the range that I am using and it is very helpful. Thank you very much.

There is one method which does not work well, so I am glad if you can tell us how to use it.
That is how to use "insertItemsAtIndexes: inParent: withAnimation" to add Cell.
This function seems to work normally in the usual way.
However, under certain conditions I did not do what I expected.

The situation can be reproduced by using the sample "TreeViewController.swift".

The situation which I think as a problem is as follows.

  1. Run TreeViewController.swift with the simulator.
  2. Open the Cell whose "Number of children" value is 1 or more. For example, open "Computers".
  3. Check the "child cells" opened with "2.". Open the Cell whose "Number of children" value is 1 or more. For example, open "Computer 1".

The screen at this point is as follows.

  Computers
    Computer 1
      Notebook 1
      Notebook 2
    Computer 2
    Computer 3
  1. In the state of "3." press the plus button on the right side of "Computers cell" to add a new cell.

In my expectation I thought that it would be as follows.

  Computers
    Computer 1
      Notebook 1
      Notebook 2
    Computer 2
    Computer 3
    Added value

However, it actually became as follows.

  Computers
    Computer 1
      Notebook 1
      Notebook 2
    Computer 2
    Computer 2
    Computer 3

If you added Cell without going through the "3." step (without opening grandchild Cell), "Added value cell" was added as expected.

I am misunderstanding how to use "insertItemsAtIndexes: inParent: withAnimation".
I hope you tell me.
Thank you for reading.

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

No branches or pull requests

1 participant