Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>You should use -[UITableViewDelegate willDisplayCell:forRowAtIndexPath:] delegate method. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { TVC_Location_View_Text *cell = (TVC_Location_View_Text *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; UILabel* labelText; if (cell == nil) { NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"TVC_Location_View_Text" owner:nil options: nil]; for(id currentObject in topLevelObjects) { if([currentObject isKindOfClass:[UITableViewCell class]]) { cell = ((TVC_Location_View_Text *) currentObject); break; } } labelText = [[UILabel alloc] initWithFrame:rect]; [labelText setFont:cellFont]; [labelText setLineBreakMode:UILineBreakModeWordWrap]; [labelText setNumberOfLines:0]; [labelText setBackgroundColor:[UIColor clearColor]]; [labelText setTextColor:appDelegate.colorDarkText]; labelText.tag = 111; [cell addSubview:labelText]; } return cell; } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { UILabel* labelText = (UILabel*)[cell viewWithTag:111]; UIFont *cellFont = [UIFont fontWithName:@"Helvetica" size:15.0]; CGSize constraintSize = CGSizeMake(300.0f, MAXFLOAT); CGSize labelSize = [self.sLocationText sizeWithFont:cellFont constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap]; CGRect rect = CGRectMake(10, 10, labelSize.width, labelSize.height); [labelText setText:self.sLocationText]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload