hi all. I have a large data to be displayed in Tableview cell can anybody tell me how to show just 10 of them after click display button. and then add more 10 when user click on load more button.
Thanks in advance.
hi all. I have a large data to be displayed in Tableview cell can anybody tell me how to show just 10 of them after click display button. and then add more 10 when user click on load more button.
Thanks in advance.
In the "number of rows i in section method" return a integer wich initially is 10. When the "load more" button is clicked add 10 to the integer and reload tableview.
You need to go give this a try first. People here will be very willing to help, but this isn't a "code it for me for free" site.
Here's the idea: Load your 10 out of however many items into an array or NSDictionary or what have you. Initialize your table with the same number of rows as you have in that data object (in -tableView:numberOfRowsInSection:
).
Then build a view in the .tableFooterView
property that maybe reports on how many of the elements are being displayed out of how many, and has a button to load more. Attach a target to that button to call a function that loads the next 10, and calls -reloadData
on your UITableView.