开发者

display 2 picker views in one controller

开发者 https://www.devze.com 2022-12-10 22:39 出处:网络
hi i\'m designing a view, where i have to post a query to the bank. For that i take the following input .1)Contact Method : Phone, email or Post(1st Picker) .2) Contact开发者_StackOverflow中文版 time

hi i'm designing a view, where i have to post a query to the bank. For that i take the following input .1)Contact Method : Phone, email or Post(1st Picker) .2) Contact开发者_StackOverflow中文版 time :Morning, Evening,Afternoon(2nd Picker) 3) Message now when i select the first text field ie Contact Method, a picker view should display with its datasource. and when i select the contact time text field, it should display the datasource for contact time.

Please tell me how am i to do it


you can create 3 arrays for each variant. Then, create some pointer, for example, currentArray. use this array as dataSource. so the only you have to do - change current array and call [myPicker reloadAllComponents] when your new field becomes firstResponder.

0

精彩评论

暂无评论...
验证码 换一张
取 消