iphone - how can I add an array containing minutes to UIPickerView? -
i want add array containing mints uipickerview, want see output below,
1 minute
2 minutes
3 minutes
4 minutes
5 minutes
........ ........
1140 minutes
how can i, have array stored value 1 1140, want display on uipickerview 'minutes' written beside digits,
- (nsstring *)pickerview:(uipickerview *)pickerview titleforrow:(nsinteger)row forcomponent:(nsinteger)component { if(i == 1) return [nsstring stringwithformat:@"%d minute", row + 1]; return [nsstring stringwithformat:@"%d minutes", row + 1]; } -(nsinteger)pickerview:(uipickerview *)thepickerview numberofrowsincomponent:(nsinteger)component { return 120; }
Comments
Post a Comment