[英]How to increase space between text label and detail text label in table view cell?
How to increase space between text label and detail text label in table view cell? 如何在表格视图单元格中增加文本标签和详细文本标签之间的空间?
I want to do this programmatically. 我想以编程方式执行此操作。
My updated answer) 我更新的答案)
I suspect you are using a standard UITableViewCell. 我怀疑您正在使用标准的UITableViewCell。
You should create your own subclassed UITableViewCell and put the labels on them directly with as much space as you want between them. 您应该创建自己的子类UITableViewCell并直接在标签上放置标签,标签之间要留有足够的空间。
My original answer) 我的原始答案)
If you're doing this programatically (you're not clear if you're doing this as an Objective-C/Cocoa app), you can adjust row height via: 如果您以编程方式进行此操作(尚不清楚是否以Objective-C / Cocoa应用程序的身份进行此操作),则可以通过以下方式调整行高:
UITableViewDelegate's tableView:heightForRowAtIndexPath: method UITableViewDelegate的tableView:heightForRowAtIndexPath:方法
or 要么
UITableView's rowheight
property UITableView的rowheight
属性
In Interface Builder (built into XCode 4.2 instead of being a separate app), you can also adjust the row height property in the Size inspector. 在Interface Builder(内置于XCode 4.2中,而不是作为一个单独的应用程序)中,您还可以在“大小”检查器中调整行高属性。
As far as I can understand, you want to increase the space between two cells and want to increase the width of separator line which is between the cells. 据我了解,您想要增加两个单元格之间的空间,并希望增加单元格之间的分隔线的宽度。
If you are looking for something readymade in form of some method or delegate, it is not available... you have to write your own trick for this one...!! 如果您正在寻找某种方法或委托形式的现成产品,则不可用...您必须为此编写自己的技巧...!
Best of luck...! 祝你好运...!
Sam 山姆
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.