![](/img/trans.png)
[英]How to update CollectionView with TableView “Did Select Row At” method
[英]How to add uipicker view in ui tableview in did selected row method
如何在didSelectRow
方法中的UITableView
中添加UIPickerView
,
根據選擇器選擇用戶在每個單元格中選擇不同的選項
首先,當你想問一個問題時,你應該添加一些你嘗試過的代碼片段。 通過這種方式,人們可以幫助您使用您的作品。
無論如何,我建議你兩種方式:
創建一個自定義UITableViewCell
類並在setSelected:
方法中創建一個UIPickerView
並將其添加到窗口中。 設置它的delegate
和dataSource
。 使用delegate
方法獲取數據並使用dataSource
方法將數據設置為UIPickerView
。
在UITableView
的tableView:didSelectRowAtIndexPath:
方法中並實現UIPickerView
delegate
和dataSource
方法與第一個選項相同。 使用這些方法更新單元格的數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.