[英]How to force UIPickerView.selectRow call didSelectRow method?
[英]how to call didselectrow method for inner table of uitableviewcell
我在 tableviewcell 中使用 tableview1,當單擊 tableviewcell 的 tableview1 時它出現在主 tableview 上,當我選擇 tableview1 cell 時它選擇主 tableview 為什么?
在 didselectrow func 中注冊您的 UItableVIewcell,然后在 didselectrow func 中添加條件,如下所示
let cell = tableView.dequeueReusableCell(withIdentifier: bandCellId, for: indexPath) as! UITableViewCell // your cellview name
if tableView == cell.tableview1
{
// do something for tableview1
}
else
{
// do something for maintableview
}
希望這可以幫助你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.