简体   繁体   English

ios-UITableView节索引标题-标题不多=>散开字母?

[英]ios - UITableView Section Index Titles - not many titles => spread out letters?

So I have a UITableView that I'm using with Section Index Titles.. but I'm not using the entire alphabet, only the individual letters required. 所以我有一个与部分索引标题一起使用的UITableView。但是我没有使用整个字母,只使用了所需的单个字母。

But the way it does this, is by even spacing each of the letters out like the two examples below: 但是,这样做的方法是将每个字母均匀隔开,就像下面的两个示例一样:

真的间隔开间隔很大

So, is there anyway I can force it to just show them consecutively w/o so much spacing? 所以,无论如何,我是否可以强迫它仅连续显示它们而没有太多间距? Maybe adjust the frame or insets? 也许调整框架或插图?

Thank you, rnc505 谢谢rnc505

I am pretty sure you are stuck with the even distribution across the height of the table view frame. 我很确定您会在表格视图框架的整个高度上保持均匀分布。

Adjusting the frame would not help as this would affect the frame of the entire table view. 调整框架将无济于事,因为这会影响整个表格视图的框架。

If you want to create an index view with a custom height you will need to do so with a custom view. 如果要创建具有自定义高度的索引视图,则需要使用自定义视图。

This is solved by Apple in iOS7. Apple在iOS7中解决了这个问题。 From iOS7 the available index titles are centered in the center at the right. 从iOS7开始,可用的索引标题位于右侧的中心。 But they lowered the maximum number before showing dots a lot. 但是他们在显示很多点之前降低了最大数量。 Only half the entries fit now. 现在只有一半的条目适合。 I filed a radar for that one (15175436). 我为该雷达提起了雷达(15175436)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM