gmoledina/GMGridView

After rotate top cells bounds wasn't recalculated

sergianiskin opened this issue · 0 comments

  1. Rotate to landscape
  2. Scroll to the bottom
  3. Call scrollToObjectAtIndex:0
  4. Rotate to portrait

Top cells bounds and positions wasn't recalculated. Its because if cached subviews. I solved this problem with one line added to layoutSubviews

if (_rotationActive)
{
_rotationActive = NO;

    // After rotation need to update cached subviews array
    [self setSubviewsCacheAsInvalid];