0
List {
  Section(header: Text("テキスト")) {
    ForEach(0..<self.pinned.count) {index in
      NavigationLink(destination: ArrayView))}}{
        Text("trash")
      }
    }

としArrayViewに遷移時に中のTextEditorにタップしたpinned内のテキストを入れたいのですが

struct ArrayView: View {
  var body: some View {
    textEditorText = pinned[index(id: .self)
  }
}

でできません。

.selfがちがうのでしょうか

textEditorTextはTextEditorの引数として使っています

1
  • コードが間違っているように思えます。実行可能な形で載せると、解答可能です。
    – zunda
    2022年12月13日 13:54

0

この質問に回答するには、ログインする必要があります。

のタグが付いた他の質問を参照する。