开发者

adding multiple lines of text to detailTextLabel without making a custom cell

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜