Alex Rivera | Logout

UITableView - How to show rows only which contains data

Asked 2011-06-20T11:27:50.740
10

How can i show UITableView Rows only which contains data not the other rows. By default UITableView shows 10 rows. If we have data for three rows It will display three rows only How can I implement this? Thank you.

Edit
Report

1 Answer

-2

You can specify the required number of rows in the return parameter of the following function :

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return NUMBER_OF_ROWS;
}

For more details please go through the Apple documentation of UITableView.

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html

answered 2011-06-20T11:31:12.720

Your Answer