如何在SegmentedRow上设置apportionsSegmentWidthsByContent

时间:2016-07-05 10:16:40

标签: ios swift eureka-forms

我需要通过文字标签自动调整SegmentedRow的片段 我的想法是使用:

segmentedControl.apportionsSegmentWidthsByContent = true

但无法获得对segmentedControl的引用。

1 个答案:

答案 0 :(得分:0)

您需要访问cell,然后使用类似于此的Eureka访问SegmentedRow上的分段控件

    <<< SegmentedRow<String>("segments"){
        $0.cell.segmentedControl.apportionsSegmentWidthsByContent = true
    }

我希望这可以帮助你,问候