```javascript
// line ? 跟滾動方向相同的間距
flowLay.minimumLineSpacing = 10;
?// item ?跟滾動方向垂直的間距
flowLay.minimumInteritemSpacing = 10;
-(UICollectionView *)userImageCollectionView
{
if (_userImageCollectionView == nil) {
UICollectionViewFlowLayout *flowLay = [[UICollectionViewFlowLayout alloc]init];
//每個cell的大小 40 60
flowLay.itemSize = CGSizeMake(CGRectGetHeight(_tripCollectionView.frame) - 10 - 20 , CGRectGetHeight(_tripCollectionView.frame) - 10);
//每個section距collectionView的邊界或者section上左下右的苦力
flowLay.sectionInset = UIEdgeInsetsMake(5, 10, 5, 10);
//cell之間的最小距離
flowLay.minimumInteritemSpacing = 10;
//每行cell之間的最小距離
flowLay.minimumLineSpacing = 10;
flowLay.scrollDirection = UICollectionViewScrollDirectionVertical;
_userImageCollectionView = [[UICollectionView alloc]initWithFrame:(CGRectMake(CGRectGetMinX(_tripCollectionView.frame), CGRectGetMaxY(_tripCollectionView.frame), CGRectGetWidth(_tripCollectionView.frame), CGRectGetHeight(_tripCollectionView.frame) * 2)) collectionViewLayout:flowLay];
_userImageCollectionView.layer.cornerRadius = 5;
_userImageCollectionView.layer.masksToBounds = YES;
_userImageCollectionView.bounces = NO;
_userImageCollectionView.backgroundColor = [[UIColor blackColor]colorWithAlphaComponent:0.5];;
[self.mapView addSubview:_userImageCollectionView];
_userImageCollectionView.hidden = YES;
}
return _userImageCollectionView;
}
```