Comments (17)
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.
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.
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.
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.
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.
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.
I still have the problem, my cells don't show when I reloadData...
from gmgridview.
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.
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.
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.
Alright, we'll look into this!
from gmgridview.
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.
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.
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.
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.
See, another reason why I'm generally against using XIB's. Glad you found it though.
from gmgridview.
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)
- How can items drag in both the directions Left to Right and Right to Left ?
- GMGridView reloadData does not refresh view
- Archives has does not contain a single–bundle application or contains multiple products
- iOS 7 Horizontal strategy content size HOT 2
- No document about how to use this control
- if cell width is quite different, grid will show wrong cell when rotating
- ios 5.1 and lower issue HOT 1
- Grid cell want to draw from top HOT 1
- scrollToObjectAtIndex is not working properly when paging is enabled HOT 1
- memory problem - not released/reclaimed HOT 1
- another mem issue
- GMGrid Cell Alignment Issue
- Image stuck on screen
- Sort Help required!
- gridview.edit=yes,how to use sortingdelegate?
- index = -2147483648
- Maybe you can join a group function
- Button not working in subview GMGridviewCell
- Image link in README.md is broken
- animation repeat count doesn't work in GMGridViewCell
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 gmgridview.