I set all my titles´s section in my TableView.
Sometime later, i need to get the values of the title in any section´s tableview,
How can i ask that values directly to the UITableView?
Without the delegate protocol:
[self tableView:tableView titleForHeaderInSection:i]
Because this method overrides an protocol of my own class.
- (NSString *) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
/* If datasource methdod is implemented, get´s the name of sections*/
SEL nameForSection = @selector(nameForSection:);
if ( (self.dataSource) && [self.dataSource respondsToSelector:nameForSection] )
{
NSString *titleSection = [self.dataSource nameForSection:section];
return titleSection;
}
return nil;
}
Thanks Advance…
This table view method will return the view for header and I think in your case it should be
UILabel