How to make UlCollectionView elements stand on the left of a line

This position (top screen shot) can only occur if there is only one element on the line; if there is more than one element on the line (elements are smaller or the screen is wider), the elements are aligned within the line, and the position looks as desired:

The UICollectionViewFlowLayout settings are as follows:
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; flowLayout.minimumLineSpacing = 20.; flowLayout.minimumInteritemSpacing = 5.; flowLayout.sectionInset = UIEdgeInsetsMake(23., 15., 23., 15.); flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical; self.collectionView.collectionViewLayout = flowLayout;
source share