I have a tableview cell which displays data in the following pattern
I want to display my data as follows
Here the number specifies the index of the cell i.e cell1 is 1st index. Basically its an even odd pattern and this should work on any split.. for example, if tomorrow the data limit goes to 20 then 10 records on left side and 10 on right side should display. So please tell me good logic to generate the above and also logic to access proper cell data on tap of each cell.