How can i store the number of current rows in a uitable into a variable?
This is my code for the table (that i think might be relevant):
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo numberOfObjects];
}
Overview. Table views in iOS display rows of vertically scrolling content in a single column. Each row in the table contains one piece of your app's content. For example, the Contacts app displays the name of each contact in a separate row, and the main page of the Settings app displays the available groups of settings ...
A screen display of several items or records in rows and columns.
Returns the number of rows (table cells) in a specified section.
You should really get this from the source of the data, rather than the table view itself, I'd have thought. (It's a bit arse about face as they'd say around here.)
That said, you could use the numberOfRowsInSection:
method within the UITableView as you've shown in your example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With