开发者

How can I get multiple arrays into UIPickerview

I have an problem in UIPickerview, it is displayed in this screenshot.

Screenshot of my UIPickerView

I have three arrays. Each array is 开发者_C百科passed into UIPickerview. I can display the three columns in UIPickerview.

My problem is that the arrays are not passed into each column and are not passed into the sub-columns.

How can I solve the problem? Please help me.


In UIPickerView delegate:

- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent (NSInteger)component

check for

if(component == 0)

{

   //use Array1

}

else if(component == 1)

{

   //use Array2

}

else if(component == 2)
{

   //use Array3

}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜