i have a tableview which displays the result from the web service the result fron the web sevice is in form of string array, where each string in the array is pretty long. It is like "1|123|JP Morgan|111|2000.0|Pending", similarly there are strings which i diplay in each row of the table. but as you can see the string is very long, to display it in a single table row. in the table view, i can just view first 3 ie "1|123|JP Morgan" the it shows.....
how can i display the entire string in the table
-
You can add a
UILabelto your cell'scontentView. If you do this, you can set theUILabel.numberOfLinesto a number greater than 1. If you set it to 0, it will use as many lines as needed.shreedevi : how do i increase the labels at runtime, like i dont know, what would be the result coming from the web service.marcc : Set numberOfLines to 0. It will expand as needed then, to fill the frame you've set.From marcc -
Your options are to make it smaller or make a custom table cell. To change the size, set the property
cell.textLabel.fontto a font of a smaller size (e.g. using[UIFont systemFontOfSize:10]. You may also want to changecell.textLabel.numberOfLinesto something greater than 1.To see more about making custom cells, read the Table View Programming Guide.
From jtbandes
0 comments:
Post a Comment