- (UICollectionView *)collectionView {
if (!_collectionView) {
CGRect collectionViewFrame = self.view.bounds;
collectionViewFrame.size.height -= (self.navigationController.viewControllers.count > 1 ? 0 : (CGRectGetHeight(self.tabBarController.tabBar.bounds))) + 0;
//FMMosaicLayout *mosaicLayout = [[FMMosaicLayout alloc] init];
FBLikeLayout *layout = [FBLikeLayout new];
layout.minimumInteritemSpacing = 5;
layout.singleCellWidth = (MIN(self.collectionView.bounds.size.width, self.collectionView.bounds.size.height)-self.collectionView.contentInset.left-self.collectionView.contentInset.right-8)/3.0;
layout.maxCellSpace = 2;
layout.forceCellWidthForMinimumInteritemSpacing = YES;
layout.fullImagePercentageOfOccurrency = 50;
_collectionView = [[UICollectionView alloc] initWithFrame:collectionViewFrame collectionViewLayout:layout];
_collectionView.delegate = self;
_collectionView.dataSource = self;
}
return _collectionView;
}