UITableViewCell以编程方式设置样式 [英] UITableViewCell set style programmatically
本文介绍了UITableViewCell以编程方式设置样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用下一个样式创建UITableViewCell(xib中右侧详细信息)
How to create UITableViewCell with an next style (Right Detail in xib)
例如我可以使用next:
For example can I use next:
cell.style ='正确的细节'(大致)
谢谢!
推荐答案
你想要的是 UITableViewCellStyleValue1
,但是你不能设置现有单元格的样式:你必须设置当你创造它时。像这样:
What you want is UITableViewCellStyleValue1
, but you can't set an existing cell's style: you have to set it when you're creating it. Like this:
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"YourIdentifier"];
这篇关于UITableViewCell以编程方式设置样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文