Skip to content

Commit 95aa37d

Browse files
committed
- fix getchildat on iOS
1 parent 0bed04a commit 95aa37d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Core/src/Platform/ViewExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ internal static bool IsLoadedOnPlatform(this IElement element)
209209
break;
210210
#endif
211211
queue.Enqueue(child);
212+
i++;
212213
}
213214
}
214215

src/Core/src/Platform/iOS/ViewExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public static void UpdateBorder(this UIView platformView, IView view)
242242

243243
internal static T? GetChildAt<T>(this UIView view, int index) where T : UIView
244244
{
245-
if (view.Subviews.Length < index)
245+
if (index < view.Subviews.Length)
246246
return (T?)view.Subviews[index];
247247

248248
return null;

0 commit comments

Comments
 (0)