need help in creating time slots [closed]
I have a UITableView and I want each row to represent a 15 minute time slot, for example row 0 to 3 would have 7:00-7:15, 7:15-7:30, 7:30-7:45, 7:45-08:00 respectively. I don't want to hard code all of this value into an array or 开发者_开发知识库so, so is it possible to convert:
0,1,2,3 to 1
4,5,6,7 to 2
8,9,10,11 to 3
etc.
If yes how do I do this?
0,1,2,3 to 1
4,5,6,7 to 2
8,9,10,11 to 3
(number/4) + 1;
精彩评论