Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Fix CollectionView in iOS 9 (#14925)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed Nov 25, 2021
1 parent 78e7f5c commit cdc3324
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Xamarin.Forms.Platform.iOS/CollectionView/ItemsViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,21 @@ void UpdateEmptyViewVisibility(bool isEmpty)
}
}

void AlignEmptyView()
void AlignEmptyView()
{
if (_emptyUIView == null)
{
return;
}

if (CollectionView.EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft)
bool isRtl;

if (Forms.IsiOS10OrNewer)
isRtl = CollectionView.EffectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft;
else
isRtl = CollectionView.SemanticContentAttribute == UISemanticContentAttribute.ForceRightToLeft;

if (isRtl)
{
if (_emptyUIView.Transform.xx == -1)
{
Expand Down

0 comments on commit cdc3324

Please sign in to comment.