简体   繁体   中英

How to add uipicker view in ui tableview in did selected row method

How to add UIPickerView in UITableView in didSelectRow method ,

Based on picker selection user select different options in each cell

First, when you want to ask a question, you should add some code pieces that you tried. In this way, people can help you using your work.

ANYWAY, I suggest you two ways:

  1. Create a custom UITableViewCell class and in setSelected: method create a UIPickerView and add it to window. Set its delegate and dataSource . Use delegate methods to get data and use dataSource methods to set data to UIPickerView .

  2. In UITableView 's tableView:didSelectRowAtIndexPath: method and implement UIPickerView delegate and dataSource methods same as in first option. Update cells' data using these methods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM