Skip to content

Commit

Permalink
Resolved-LastSection-ItemsSpacing-Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashKannanSf3972 committed Nov 29, 2024
1 parent 52c6b30 commit 0e5aabf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Controls/src/Core/Handlers/Items/iOS/ItemsViewLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ internal void SetInitialConstraints(CGSize size)
public virtual UIEdgeInsets GetInsetForSection(UICollectionView collectionView, UICollectionViewLayout layout,
nint section)
{
// If we're at the last section, we don't need to add the right inset
// Github issue : https://github.com/dotnet/maui/issues/25433
if (section >= (collectionView.NumberOfSections() - 1))
{
return UIEdgeInsets.Zero;
}

if (_itemsLayout is GridItemsLayout gridItemsLayout)
{
if (ScrollDirection == UICollectionViewScrollDirection.Horizontal)
Expand Down

0 comments on commit 0e5aabf

Please sign in to comment.