             return true
         }
 
-        return !(collectionView?.bounds.size.equalTo(newBounds.size) ?? false)
+        guard let notNilCollectionView = collectionView else {
+            return true
+        }
+        return !notNilCollectionView.bounds.size.equalTo(newBounds.size)
     }
 
     override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {

                    attribute.center.x
                let degress = -90 * self.rotationRatio * (distance / (self.collectionView?.bounds.width ?? 1))

                let cosValue = CGFloat(fabs(cosf(Float(AngleWithDegrees(degress)))))
                let translateY = self.rotationRadius - self.rotationRadius * cosValue
                var transform = CGAffineTransform(translationX: 0, y: translateY)
                transform = transform.rotated(by: AngleWithDegrees(degress))

     *  rotationRadius表示旋转的半径
     *  @warning 仅当 style 为 QMUICollectionViewPagingLayoutStyleRotation 时才生效
     */
    private var _rotationRatio: CGFloat = 0
    public var rotationRatio: CGFloat {
        get {
            return validated(rotationRatio: _rotationRatio)
        }
        set {
            _rotationRatio = newValue
        }
    }

