kwigbo

Adventures in iOS!

0 notes &

UITableViewCell Multiline Text

- (UITableViewCell *)tableView:(UITableView *)aTableView 
	cellForRowAtIndexPath:(NSIndexPath *) indexPath
{		
	UITableViewCell *cell = [aTableView 
		dequeueReusableCellWithIdentifier:@"Cell"];
 
	if(cell == nil)
	{
		cell = [[UITableViewCell alloc] initWithFrame:CGRectZero 
			reuseIdentifier:@"Cell"];
 
		cell.selectionStyle = UITableViewCellSelectionStyleNone;
 
		cell.textLabel.font = [UIFont fontWithName:@"Arial" size:18];
		cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
		cell.textLabel.numberOfLines = 3;
	}
 
	return cell;
}

Filed under snippet iphone iphone dev