我需要让 SegmentedRow
的各段通过其文本标签自动调整大小。
我的想法是使用:
segmentedControl.apportionsSegmentWidthsByContent = true
但无法获取对 segmentedControl
的引用。
最佳答案
您需要访问cell
,然后使用Eureka访问SegmentedRow
上的分段控件,如下所示
<<< SegmentedRow<String>("segments"){
$0.cell.segmentedControl.apportionsSegmentWidthsByContent = true
}
希望这对您有帮助,问候
关于ios - 如何在 SegmentedRow 上设置 apportionsSegmentWidthsByContent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38200837/