Everything,
I am very new to programming on iphone. In the following code, I want the text to display all the text in the comment label, but right now it truncates it. numberofLines does not work either. This is now being done. “My name is Fred and I'm dead ...”, but I want him to display the full text “My name is Fred, and I'm not dead yet, so let me live,” even if it should be on several lines.
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 80.0; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = nil; cell = [self.allCells objectForKey:[NSNumber numberWithInt:indexPath.row]]; if(!cell) { cell = [[[NSBundle mainBundle] loadNibNamed:@"UserCell2" owner:nil options:nil] lastObject]; cell.backgroundColor = [UIColor clearColor]; cell.accessoryType = UITableViewCellAccessoryNone; cell.selectionStyle = UITableViewCellSelectionStyleNone; [self.allCells setObject:cell forKey:[NSNumber numberWithInt:indexPath.row]]; } GSAsynImageView *imgView = (GSAsynImageView*)[cell viewWithTag:1000]; UILabel *lblTitle = (UILabel*)[cell viewWithTag:1001]; UILabel *lblComment = (UILabel*)[cell viewWithTag:1003]; UILabel *lbltime = (UILabel*)[cell viewWithTag:1004];
source share