我有一個包含兩個部分的tableView的視圖控制器。第1節只有一行,第2節有一些沒有數量限制的數組。根據UIPickerView選擇更新UITableView內容
當我點擊第1節中的單元格時,我有一個pickerView出現在一個Action Sheet中。無論我在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"
等等...
此外,我想的tableView如我所需的字符串駁回pickerView來更新其內容。 一些示例代碼/參考非常感謝。