1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Wrap text in a specific TableView case?

Discussion in 'iPhone/iPad Programming' started by jjgraz, Apr 18, 2009.

  1. macrumors regular


    I have a tableView with attached Detail page. In the detail page is a Indexed TableView. One of the items(cases) requires a text wrap....Is there a way to Wrap text in a specific TableView case? See Code Below. Any help would be greatly appreciated. Thank you.

    - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];


    case 0:
    cell.text = alabel.name;
    cell.font=[UIFont fontWithName:mad:"Courier" size:15.0];
    case 1:
    cell.text = alabel.date;
    cell.font=[UIFont fontWithName:mad:"Courier" size:15.0];

    Thank you.
  2. macrumors 68030


    You need to use a multiline label that's added the the cell if you want to wrap the text.

Share This Page