I have a table view that contains 120 numbers. I was wondering if it is possible to add a section in my tableview after every 12 numbers. This would be easier than having 10 separate arrays of 12 numbers and adding each array to a different section.
thanks!
I have a table view that contains 120 numbers. I was wondering if it
Share
I’m reading your question and wondering if I’m missing something here, but: Yes, it’s possible.
…and then in your
tableView:cellForRowAtIndexPath:method, useindexPath.section * 12 + indexPath.rowas the index into your 120-number array.