views:

37

answers:

2

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.

+1  A: 

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.

Larsaronen
can you code it please......... em very fresh to iphone development
Nauman.Khattak
I have done it now 10 rows are displayed..... now pls tell me how to add 10 more to the rows when user click on load more button
Nauman.Khattak
+1  A: 

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.

Dan Ray