UISegmentedControl text with multiple lines?

前端 未结 6 1804
再見小時候
再見小時候 2020-12-08 04:20

How can I make the text in one of the buttons in my UISegmentedControl span multiple lines?

6条回答
  •  不知归路
    2020-12-08 05:01

    Years later...

         for segment in segmented.subviews{
            for label in segment.subviews{
                if let labels = label as? UILabel{
                    labels.numberOfLines = 2
    
                }
            }
        }
    

提交回复
热议问题