I am using IGGridView with Carousel mode. I have just added the following code to my project. What this method does is to move the circles to the bottom of the screen.
-(void)doTest{
NSArray* array = _gridView.visibleCells;
for (Cell* cell in array) {
[UIView animateWithDuration:0.5 animations:^{
CGRect frame = cell.frame;
frame.origin.y += 100;
cell.frame = frame;
[self.view layoutIfNeeded];
}];
}
The circles move with the animation to the bottom of the screen but when I scroll the grid view, the -(void)cellLocationInViewportChanged:(CGPoint)location returns the initial location values for each cell. So that the circles start moving from their initial location. I thought if I update the cell frames the location parameter was going to return an updated value. Any work around to force the cellLocationInViewportChanged returns updated location value?
I can ask my question in another way. Where does this location parameter take it's value? Which parameter do I need to change in gridview? Thank you for your support.
Hi,
The cells locations are controlled by the grid. You really shouldn't me changing their positioning outside of it.
Sounds like you should just be moving the IGGridView to the bottom, then all of the cells will of course move with it, and the positioning logic will be in tact.
-SteveZ