2 つのセクションを持つ tableView を含むビュー コントローラーがあります。セクション 1 には行が 1 つしかなく、セクション 2 には行数に制限のない配列があります。
セクション 1 のセルをクリックすると、アクション シートに pickerView が表示されます。pickerView で選択したコンポーネントは、そのセクション 1 セルのタイトルになります。
今、私の質問は、
tableView のセクション 2 の内容は、セクション 1 のセルのタイトル テキストに依存しますか?
例えば:
if Section 1's text is = "String A", Section 2's contents should be = "Array A"
if Section 1's text is = "String B", Section 2's contents should be = "Array B"
if Section 1's text is = "String C", Section 2's contents should be = "Array C"
if Section 1's text is = "String D", Section 2's contents should be = "Array D"
等々...
また、目的の文字列で pickerView を閉じるときに、tableView の内容を更新したいと思います。いくつかのサンプル コード/リファレンスは大歓迎です。