1

I've a scenario where 9 UICollectionViewCell are generated programmatically. It should be arranged in 3*3 format in all iPhone variant.

Also the button size to get increased or decreased based on iPhone device. For eg., In iPhone 4s it should be small so that 3*3 format is arranged properly and in iPhone 6 Plus it should be big enough so that 3*3 format is achieved.

Screenshot 1

I had tried setting constraints programmatically but didn't get desired result.

Screenshot 2

How to set constraints programmatically to UICollectionViewCell such that purpose is achieved?

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177

0 Answers0