objective c - UIPickerView Spin Confusion -
i have app making has pickerview , uibutton. want user tap button , make picker view show random selection. have been looking around , can't seem come anything. guess similar urbanspoon app. know piece of code can't think of be.
you looking – selectrow:incomponent:animated:
so this:
[thepickerview selectrow:(arc4random() % numrows) incomponent:0 animated:yes]; where numrows number of rows. if rows associated array names rowarray instance be:
[thepickerview selectrow:(arc4random() % [rowarray count]) incomponent:0 animated:yes];
Comments
Post a Comment