 //        return self.layoutAttributes[indexPath.section][indexPath.row]
 //    }
 
-//    override func shouldInvalidateLayoutForBoundsChange(newBounds: CGRect) -> Bool {
-//        return false
-//    }
+    override func shouldInvalidateLayoutForBoundsChange(newBounds: CGRect) -> Bool {
+        return true
+    }
 
     // MARK: Private
 }

            delay += 0.1 * 2
        }


        let transformAnimation = CABasicAnimation(keyPath: "position.y")
        transformAnimation.duration = 0.3
        transformAnimation.fromValue = offset + CGFloat(itemIndexPath.section) * (cellSize.height + cellSpace)

            delay += 0.1 * 2
        }

        let transformAnimation = CABasicAnimation(keyPath: "center.y")
        transformAnimation.duration = 3
        transformAnimation.fromValue = offset + self.cachedAttributes[itemIndexPath]!.center.y
        transformAnimation.toValue = self.cachedAttributes[itemIndexPath]!.center.y
        transformAnimation.timingFunction = CAMediaTimingFunction(controlPoints: 0.45, 1.2, 0.75, 1.0)
        transformAnimation.removedOnCompletion = false
        transformAnimation.fillMode = kCAFillModeForwards
        transformAnimation.beginTime = CACurrentMediaTime() + delay

        let attributes = MSTumblrMenuLayoutAttributes(forCellWithIndexPath: itemIndexPath)
        attributes.alpha = 1.0
        attributes.animation = transformAnimation
        attributes.size = self.cellSize
        attributes.center = CGPointMake(self.cachedAttributes[itemIndexPath]!.center.x,  offset + self.cachedAttributes[itemIndexPath]!.center.y)
        return attributes
    }

