I have to make one collection view so that irrespective of iphone size we have just 2 images in each row and also we need border between each row and column as shown in the image.
I want like this:
I have to make one collection view so that irrespective of iphone size we have just 2 images in each row and also we need border between each row and column as shown in the image.
I want like this:
Implement the following functions from collectionView's protocol:
...where view is your controller's (super) view
Try this code. Just a different approach.
Output from above code on different devices.
Swift 4.* and Xcode 9.3
If you are using multiple collectionView on same ViewController then you can use something as below -