         let margin = (self.myDataSource == nil) ? defaultMarginOfCells : self.myDataSource!.marginOfCells(self)
         let cellWidth = (UIScreen.mainScreen().bounds.size.width - margin * (CGFloat(numberOfCells) + 1)) / CGFloat(numberOfCells)
         layout.itemSize = CGSize(width: cellWidth , height: cellWidth)
+        layout.sectionInset = UIEdgeInsetsMake(margin, margin, margin, margin)
+        layout.minimumInteritemSpacing = margin
+        layout.minimumLineSpacing = margin
         return layout
     }
     

    
}

// MARK: ResizableCollectionViewDataSource
public protocol ResizableCollectionViewDataSource : UICollectionViewDataSource {
    
    func minNumberOfCellsInLine(collectionView: ResizableCollectionView) -> Int

    
}

// MARK: - ResizableCollectionViewDelegate - default implementation
extension ResizableCollectionViewDelegate {
    
    func willPinchIn(collectionView: ResizableCollectionView) {
