From bf66cab7b4309e70d244a54a188197a4b31a5d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=98=EC=98=81=EC=84=A0=28Youngsun=20Ban=29?= Date: Mon, 8 Jun 2026 20:58:29 +0900 Subject: [PATCH] fix(ios): use positional index for TabView tags to avoid duplicate .tag --- ios/PagerView.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ios/PagerView.swift b/ios/PagerView.swift index 7b296a0e..58d97882 100644 --- a/ios/PagerView.swift +++ b/ios/PagerView.swift @@ -10,11 +10,9 @@ struct PagerView: View { var body: some View { TabView(selection: $props.currentPage) { - ForEach(props.children) { child in - if let index = props.children.firstIndex(of: child) { - RepresentableView(view: child.view) - .tag(index) - } + ForEach(Array(props.children.enumerated()), id: \.element.id) { index, child in + RepresentableView(view: child.view) + .tag(index) } } .id(props.children.count)