6

How is to make the items of the UlCollectionView to stand in the left within the line

enter image description here

Such position (upper screenshot) can take place only in the case when there is the only item on the line; if there is more than one element on the line (items are smaller or the screen is wider),the elements are left justified within the line and position looks like desired:

enter image description here

The settings of UICollectionViewFlowLayout are the following:

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;
Max
  • 536
  • 2
  • 10
  • 26
  • 2
    Possible duplicate of [Left Align Cells in UICollectionView](http://stackoverflow.com/questions/22539979/left-align-cells-in-uicollectionview) – Arclite Aug 14 '16 at 12:54

0 Answers0