UITableViewDataSource tableView numberOfRowsInSection
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
Parameters
tableView
The table-view object requesting this information.
section
An index number identifying a section in tableView.
Return Value of [UITableViewDataSource tableView numberOfRowsInSection]
The number of rows in section.
UITableViewDataSource tableView numberOfRowsInSection example.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (courses) {
NSLog(@"Count: %i", [courses count]);
return [courses count];
}
else {
NSLog(@"Count: 0");
return 0;
}
}
{
if (courses) {
NSLog(@"Count: %i", [courses count]);
return [courses count];
}
else {
NSLog(@"Count: 0");
return 0;
}
}
Example of [UITableViewDataSource tableView numberOfRowsInSection].
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
NSLog(@"COUNTER: %i",[content count]);
return [content count];
}
{
NSLog(@"COUNTER: %i",[content count]);
return [content count];
}
UITableViewDataSource tableView numberOfRowsInSection example.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return data.count;
}
{
return data.count;
}