 
 public class SquareMosaicLayout: UICollectionViewLayout {
     
-    public weak var delegate: SquareMosaicLayoutDelegate?
+    public weak var dataSource: SquareMosaicLayoutDataSource?
+    public weak var delegate: SquareMosaicLayoutDelegate? {
+        didSet {
+            delegate?.layoutHeight(layoutHeight)
+        }
+    }
     private var cache: [[UICollectionViewLayoutAttributes]] = []
     private var layoutHeight: CGFloat  = 0.0
     

    }
}

public protocol SquareMosaicLayoutDelegate: class {
    
    var pattern: SquareMosaicPattern { get }
}

private extension UICollectionView {

            }
            cache.append(attributes)
        }
        delegate?.layoutHeight(layoutHeight)
    }
    
    override public func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
