         super.layoutSubviews()
         collectionView.frame = bounds
         gradientLayer.frame = bounds
-        
-        
-        layout.invalidateLayout()
-        collectionView.layoutIfNeeded()
+
         recenterIfNeeded()
     }
 }

            }
            cellForItem(at: indexPath)?.select(withAnimation: selectAnimation)
            selectedIndexes = [indexPath]
//            var needsReload = false
//
//            // deselect all selected dates
//            selectedDates.forEach {
//                if let index = indexPathForDate($0),
//                    let deselectCell = collectionView.cellForItem(at: index) as? YMMonthDayCollectionCell {
//                    deselectCell.deselect(withAnimation: deselectAnimation)
//                } else {
//                    // if collectionView couldn't find cell by cellForItem(at:_),
//                    // should reload() in completion after animation.
//                    needsReload = true
//                }
//            }
//            selectedDates = [date]
            
//            // animate select cell
//            if let selectedCell = collectionView.cellForItem(at: indexPath) as? YMMonthDayCollectionCell {
//                selectedCell.select(withAnimation: selectAnimation) { _ in
//                    if needsReload {
//                        self.reload()
//                    }
//                }
//            }
        }
        
        delegate?.calendarView?(self, didSelectDayCellAtDate: dateForDayAtIndexPath(indexPath))

    /// Manager of registered class and identifiers.
    fileprivate var reuseQueue = ReusableObjectQueue()
    
    private var maxStartDate: Date? {
        var date: Date? = nil
        if let dateRange = dateRange {
            var comps = DateComponents()
