I am developing a table view. To fill that table i have an array of 75 content. Now i want to show table view like as when first time shown table view then show only 10 row of array and one button whose title is show more. when click on button then show next 10 content of array in table view and in last of table view show two button previous and next. When click on next then again show next 10 content of array and when click on previous then show previous 10 content. Now problem is that what i will do with array so that i get this type look? How code for that in table view?
Share
You can go like below..
1.. Take a variable suppose n=11
2.. in
cellForRowAtIndexPathwrite a code for only n-1 cells… and for nth cell create a button for first time that shows show more as you said3.. Now in
didSelectRowAtIndexPathwrite a code to identify that the selected cell has index == n?? if yes then call a method which will increment n with 10 and then again reload table.4.. Go on incrementing and decrementing n as you want… but remember to reload data with nth row selection