I am trying to wrap my section header and UILineBreakModeWordWrap
is not helping. Any idea what I am doing wrong?
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *rOView = [[UIView alloc] initWithFrame:CGRectMake(10,0,300,60)] ;
UILabel *sectionLabel = [[UILabel alloc] initWithFrame:CGRectZero];
sectionLabel.backgroundColor = [UIColor clearColor];
sectionLabel.font = [UIFont boldSystemFontOfSize:18];
sectionLabel.frame = CGRectMake(70,18,200,20);
sectionLabel.text = @"A really really long text A really really long text A really really long text";
sectionLabel.textColor = [UIColor blueColor];
sectionLabel.numberOfLines = 0;
sectionLabel.lineBreakMode = UILineBreakModeWordWrap;
[roView addSubview:sectionLabel];
return roView;
}