I need cells one nearby another like below
but i am getting like this: in short phones they are very far from one another
for collectionview i have given constraints:
height = 80, leading = trailing = 0, top = 20
and in viewdidload:
override func viewDidLoad() {
super.viewDidLoad()
//services collectionview cell
let serviceLayout = UICollectionViewFlowLayout()
serviceLayout.minimumInteritemSpacing = 0
serviceLayout.minimumLineSpacing = 0
serviceLayout.estimatedItemSize = UICollectionViewFlowLayout.automaticSize
self.servicesCollectionView.collectionViewLayout = serviceLayout
servicesCollectionView.contentInsetAdjustmentBehavior = .always
servicesCollectionView.addObserver(self, forKeyPath: "contentSize", options: .new, context: nil)
}
i haven't given anything more then this.. please do help.. to get collectionview cells to come near to each other