开发者

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

开发者 https://www.devze.com 2023-01-25 18:43 出处:网络
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

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

精彩评论

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

关注公众号