I have some urls in my tableView...What can I do to see not cut urls like: "http://bla-bla-bla.com/bla..."?
I need to see this in my table view: "http://bla-bla-bla.com/bla-bla-bla/bla-bla-bla.png"
Thank you very much!
here is the part of the code, where I input the data:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID = @"LinkID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
}
NSData *n = [self.data objectAtIndex:indexPath.row];
[cell.imageView setImageWithURL:[[NSURL alloc]initWithString: [self.data objectAtIndex:indexPath.row]] placeholderImage:[UIImage imageNamed:@"placeholder"]];
cell.textLabel.text = [n description];
return cell;
}
One option is to allow the table cell text to resize to fix the text.
You may also wish to change the label's
lineBreakMode. It may be better to useNSLineBreakByTruncatingMiddleinstead of the defaultNSLineBreakByTruncatingTail.Another option might be to setup a multi-line label and use character wrapping for the long URL.