ios - Cell spacing in UICollectionView minimumInteritemSpacing -


How to set cell spacing in a section of the UICollectionView? UICollectionView is a property minimumInteritemSpacing , I need to set 1.0, still this will not work. And I implemented the delegate method

  - (CGFloat) View the collection: (UICollectionView *) collectionView Layout: (UICollectionViewLayout *) Collection ViewLayout Minimum InteritemSpacingForSectionAtIndex: (NSInteger) section {return 1.0; }  

To test how your collection cells look, you try it You can do storyboard with the help of storyboard, just for the sake of check, some stationary cells like it in your collection visual controller so that your screen looks like this:

No, you can see the cells and the space between them. In your case, the cells as shown above will appear with inappropriate vacancies. So now open this screen with open, open Size Inspector above your interface builder. This will look something like this:

Enter image details here

Now you can see some options in the shape inspector window, you can adjust the size of each cell and adjust the space between them by the minimum. For the interval option and finally the equal interval from left and right sides, use the section inset option. As you change values ​​there, the changes will be reflected in your controller view. So you can get an idea if you want to increase / decrease some values.

Hope it helps.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -