I am using IGGridView Carousel controller. The carousel works well.
The problem is I can't see the rounded carousel views' positions and dimensions correctly when I update some of the values of the IGGridView. Before the cellLocationInViewportChanged method gets triggered if I change the max and min values for the percentage from the middle calculation, the sub UIView dimensions inside the CarouselView are not being displayed correctly. If I scroll far left IGGridView display them in correct dimensions and positions.
My scenario is:
1) initialise the IGGridView and display the rounded Carousels - works perfect.
2) bring IGGridView to bottom of the screen and change the size of the rounded Carousels (min and max values) - doesn't display the way I want. Spacing and scaling doesn't look good.
3) scroll far left or right then IGGridView displays the Carousels correctly.
Why? What am I missing? Do I need to remove the IGGridView from parent and initialise it all the time if I want to change the rounded Carousels?
Hi,
So i'm not 100% sure i understand the case, so please correct me if i'm misunderstanding the issue.
1. You Create a grid using the cell location method and it works great.
2. You Adjust the size of the gridView, and thus adjust your cell's layout variables.
3. After you adjust the size, the cells don't seem to be using the new layout variables, but once you scroll them out of view and back in they work.
If thats the case, its probably just that you haven't told the cell to reload its cells after you updated. Basically the Grid is optimized to not try and reload cells unless it has to.
So, assuming this is the case, you should really just need to call [gridView updateData] and that will tell the grid to reload its cells, but keep the same scroll position.
Hope this helps,
-SteveZ
Thank you Steve. The updateData method triggered the -(IGGridViewCell*)gridView:(IGGridView*)gridView cellAt:(IGCellPath*)path and fixed my problem.