I think the documentation is the best :
minimumLineSpacingForSectionAt:
For a vertically scrolling grid, this value represents the minimum spacing between successive rows. For a horizontally scrolling grid, this value represents the minimum spacing between successive columns. This spacing is not applied to the space between the header and the first line or between the last line and the footer.
minimumInteritemSpacingForSectionAt:
For a vertically scrolling grid, this value represents the minimum spacing between items in the same row. For a horizontally scrolling grid, this value represents the minimum spacing between items in the same column. This spacing is used to compute how many items can fit in a single line, but after the number of items is determined, the actual spacing may possibly be adjusted upward.
So if your scrollDirection is horizontal, you need to set minimumInteritemSpacingForSectionAt to CGFloat.greatestFiniteMagnitude and if your scrollDirection is vertical, you need to set minimumLineSpacingForSectionAt to CGFloat.greatestFiniteMagnitude for getting one row collectionView