GithubHelp home page GithubHelp logo

Comments (17)

gmoledina avatar gmoledina commented on June 12, 2024

It is suppose to work. In fact, just changing the dataSource will automatically call the reloadData method.
You can show me some code and I can help you figure it out.

from gmgridview.

gmoledina avatar gmoledina commented on June 12, 2024

I'll consider this issue fixed as I didn't get any reply. Feel free to re-open an issue if the problem persists.

from gmgridview.

Maverick1st avatar Maverick1st commented on June 12, 2024

The Issue still exists.
I have exactly the same problem.
I am displaying several items (500) in the view. When i use a search to thin out the items to be displayed, my datasources content array is correctly updated, when i call reloadData, but in loadRequiredItems the for loop is not entered and therefore cellForItemAtIndex is not called.

I hope you can find the bug with this info. I haven't found it yet. :(

EDIT:
It seems, that rangeOfPositions is not calculated correctly

EDIT:
It seems to me that the GmGridView variable is somehow "forgetting" its delgates and datasource.
If i set the delegates right before calling reloadData at least the rangeOfPositions is calculated. But the cells are not reduced to the number in the data array. :(

from gmgridview.

gmoledina avatar gmoledina commented on June 12, 2024

I will create a demo3 in the demo app:

  • the controller will have 2 different arrays for the data
  • a UISegmentedControl will allow switching between the 2 arrays
    Can you confirm this setup should reproduce the bug ?

Also, can you test with the develop branch as well ? Is the bug still there ?

from gmgridview.

Maverick1st avatar Maverick1st commented on June 12, 2024

I had some problems downloading the development branch. Unfortunately my knowledge about github is rather small.
As far as i can say i could reproduce the bug with the current master branch in a Viewcontroller i created myself.
Currently i dont have more info than the one i provided you with, but i will look deeper into it if it helps.
Regarding to your demo3. That should reproduce the bug. The bug occured everytime i changed the content of the data array. So this should be fine.

from gmgridview.

gmoledina avatar gmoledina commented on June 12, 2024

I added a segmentedControl to switch content data in demo1 (in develop branch).

Works fine with me.
We'll check this issue again after merging all develop branch in master branch.

from gmgridview.

ecirb67 avatar ecirb67 commented on June 12, 2024

I still have the problem, my cells don't show when I reloadData...

from gmgridview.

aquarius avatar aquarius commented on June 12, 2024

I also ran into this bug and found time to debug it today.

In my case the problem was the UIViewAnimation block in reloadObjectAtIndex:withAnimation:. In some cases the completion block got executed after currentView got reused. This caused that the view got removed from the scrollview although it was already used as a cell somewhere else. Very stupid bug to debug. My recommendation to fix this bug would be the introduce a new view tag that indicates that the view is used for an animation and shouldn't be reused at this time.

from gmgridview.

gmoledina avatar gmoledina commented on June 12, 2024

Thanks for the additional info on the bug !

If I'm not mistaken, @steipete fixed this in the develop branch by removing the reused cell from the array before the animation block. Can you confirm Peter ?

from gmgridview.

steipete avatar steipete commented on June 12, 2024

I'm not sure I fixed that one. Only thing I can remember is that my fix stopped scrolling to the top on reloadData.

from gmgridview.

gmoledina avatar gmoledina commented on June 12, 2024

Alright, we'll look into this!

from gmgridview.

Maverick1st avatar Maverick1st commented on June 12, 2024

Have you yet found out what the error is, or how it can be fixed? And can you tell me, how i can switch to developers branch in github? Its only showing me the master branch.
I'll look into it today, too. So maybe i can find something.

from gmgridview.

dennda avatar dennda commented on June 12, 2024

See that button on the left that says "branch: master" in this screenshot: http://cl.ly/33382e472p1C1n2k0E0j

You will need to switch to that branch on your local development machine, too. See one of the plenty git resources on the web, e.g. http://book.git-scm.com/

from gmgridview.

Maverick1st avatar Maverick1st commented on June 12, 2024

thx. Now i got it.
Unfortunately the bug still occurs, after switching to the developers branch.
But in the Demo it works. I'll try to find out, why. Maybe i have done something wrong in my implementation of the delegatemethods.

from gmgridview.

Maverick1st avatar Maverick1st commented on June 12, 2024

Ok, After more testing i discovered, that the bug was an issue of using a xib instead implementing the view representing the GMGridView by code and too much copy and paste without thinking.
That way i accidentally created two gridviews, which was very hard to debug, because the second alloc init call of GMGridView was done by my xib and thus i got neither a log, nor an additional call of the methods, i had my logs in.
I finally discovered it by scrolling "over" the scrollview content size and found that there was sitting a second GMGridView displaying the data i wanted.

I'm sorry for all that confusion my error produced, but i might also be, that using the developers branch also had some part in getting this to work for me.
Anyway, now i can use this supercalifragilisticexpialigetc framework!

Thanks to all of you for your patience and your support.

from gmgridview.

steipete avatar steipete commented on June 12, 2024

See, another reason why I'm generally against using XIB's. Glad you found it though.

from gmgridview.

aditya422 avatar aditya422 commented on June 12, 2024

I have four cells in my gmgridview i want to lock the cell at particular index while other 3 cells are able to it would be better if i have method like

  • (BOOL)GMGridView:(GMGridView *)gridView shouldAllowMovingCell:(GMGridViewCell *)view atIndex:(NSInteger)index;

so that i can allow only those cells to move which i want

Is there any solution for my problem in current library. If yes then please let me know

from gmgridview.

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.