ios - how to set constraint for uicollectionview so that it adjusts with all devices -


enter image description here/users/seedoo/desktop/simulator screen shot 28-jul-2017, 1.33.59 pm.png /users/seedoo/desktop/simulator screen shot 28-jul-2017, 1.34.37 pm.png

the gaps between cells less in iphone 5s device in 6s.please let me know how solve issue.thanks in advance.

try : make changes in methods per needs

objective c

- (cgsize)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout*)collectionviewlayout sizeforitematindexpath:(nsindexpath *)indexpath{     return  cgsizemake(collectionview.frame.size.width/2 -5, 135); // 2 indicates number of cell in sigle row }  - (uiedgeinsets)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout *)collectionviewlayout insetforsectionatindex:(nsinteger)section{     return uiedgeinsetsmake(0, 0, 0, 0); }  - (cgfloat)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout *)collectionviewlayout minimuminteritemspacingforsectionatindex:(nsinteger)section{     return 10.0f; }  - (cgfloat)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout *)collectionviewlayout minimumlinespacingforsectionatindex:(nsinteger)section {     return 10.0f; } 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -