🍏/iOS
[iOS] Single CollectionViewCell을 왼쪽 정렬(left align) 하기
eungding
2021. 8. 12. 23:58
728x90
반응형
# 이슈
collectionview 안에 cell이 두개 이상이면 왼쪽 정렬이 된다.
하지만 cell이 하나 일 때만 센터 정렬이 된다.
# 해결
collectionView의 estimate size를 automatic -> none 으로 바꾸면
single cell 일 때도 왼쪽 정렬이 잘된다.
# Reference
align single UICollectionViewCell to the left of the collectionView
I've got a collectionView that is inside a tableView cell. The collectionView has multiple sections. If a section has only one cell, the cell appears centered. How can I align that single cell to the
stackoverflow.com
반응형