Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/core/ui/core/view/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,19 @@ export class View extends ViewCommon {
IOSHelper.invalidateStatusBarAppearance(ownerController, `View.updateStatusBarStyle:${value}`);
}

public _childIndexToNativeChildIndex(index?: number): number {
if (typeof index !== 'number') {
return index;
}
// The glass effect view is a subview but not a child: it sits at subview
// 0, so every child's subview index is one past its child index.
const effectView = this._glassEffectView;
if (effectView && effectView.superview === this.nativeViewProtected) {
return index + 1;
}
return index;
}

[iosGlassEffectProperty.setNative](value: GlassEffectType) {
if (!this.nativeViewProtected || !supportsGlass()) {
return;
Expand Down
3 changes: 2 additions & 1 deletion packages/core/ui/layouts/layout-base-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export class LayoutBaseCommon extends CustomLayoutView implements LayoutBaseDefi
result += this._subViews[i]._getNativeViewsCount();
}

return result;
// The platform base accounts for native subviews that are not children.
return super._childIndexToNativeChildIndex(result);
}

public eachChildView(callback: (child: View) => boolean): void {
Expand Down
Loading