tags:

views:

33

answers:

2

For Ex:I have 5 Section each section should be displayed as Button where it also have button title to display by pressing that button it should display no. of rows for ex: 5 rows. it is different for every section.each functionality should be done by TableView Only so how it's possible?Please guide me on solving this problem.

A: 

Try calling:

 int rowsInSection = [tableView.dataSource tableView:(UITableView *)tableView numberOfRowsInSection:section]);

That should do the trick.

Kenny
A: 

You should use:

[yourTableView numberOfRowsInSection:sectionNumber];

This method checks for number of rows in desired section.

Cheers, Paul

Pawel