Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set rich text properties on a UITableView footer?

I am using

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
  if ( section == 0 )
  {
    return NSLocalizedString(@"Section_0_text", @"");
  }
  if ( section == 1 )
  {
    return NSLocalizedString(@"Section_1_text","");
  }
  return nil;  
}

Can I modify return string text font, color and other few properties?

like image 707
iamMobile Avatar asked Jan 24 '23 02:01

iamMobile


1 Answers

Take a look at the UITableViewDelegate class, specifically the methods tableView:viewForFooterInSection: and tableView:heightForFooterInSection:. You can return whatever kind of view you'd like, including--but not limited to--a UILabel with whatever text properties you want.

like image 107
Sixten Otto Avatar answered Mar 07 '23 13:03

Sixten Otto