开发者

how to modify this code

开发者 https://www.devze.com 2023-02-09 13:13 出处:网络
I read the post Add UIPickerView & a Button in Action sheet - How? I want to add data to the uipicker view from nsarray , specially I have two buttons that they will call different two uipickervi

I read the post Add UIPickerView & a Button in Action sheet - How?

I want to add data to the uipicker view from nsarray , specially I have two buttons that they will call different two uipickerview , so I cannot use the delegate of uipickervi开发者_C百科ew

also what is the code to clise this uipickerview

any suggestion please


– pickerView:titleForRow:forComponent:

If you use that method you are acctually being passed the appropriate pickerview... so you can work out what pickerview you are dealing with from that. Its the same with most of the other delegate methods. So use that to work out what picker view you are dealing with and change the content accordingly.

To get rid of the actionsheet you can do:

[actionSheet dismissWithClickedButtonIndex:0 animated:YES];
0

精彩评论

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