Is it possible to add multiple lines of text as a detailTextLabel without making a custom cell in my application? If so can anyone show me the proper way to implement thi开发者_如何转开发s?
The line of code
cell.detailTextLabel.numberOfLines = x;
will set the number of lines your cell will display (x being the number of lines you need to display). Set to 0 if you want to remove the maximum limit and display as many lines as needed.
Change style of your cell from cellForRowAtIndexPath function.
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
精彩评论