i have a UICollectionView and it can horizontal scroll. every cell is full of the screen.when i scroll the cell there are left margin in my CollectionView.the more i scroll ,the margin increase by times.the left in the pic is the margin instead of not full of the width of the device there must be some parameters i didnt set up .can anybody help me .Thanks.
0
votes
2 Answers
1
votes
0
votes
Use these below methods, UICollectionView set Paging correctly and its work for me,
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
{
return 0.0;
}
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
{
return 0.0;
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
{
return UIEdgeInsetsMake(0, 0, 0, 0);
}
hope its helpful