yonat / MultiSelectSegmentedControl

UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images.
MIT License
300 stars 60 forks source link

Add multiline support #37

Closed askiiRobotics closed 4 years ago

askiiRobotics commented 4 years ago

Description: In MultiSelectSegment.swift in UILabel init you can provide an additional attribute to set numberOfLines property to 0 in order to support multiline.

Thank you for your awesome project anyway!

yonat commented 4 years ago

Added titleConfigurationHandler in 2.3.2 for that:

multiSelect.titleConfigurationHandler = {
    $0.numberOfLines = 0
    $0.lineBreakMode = .byWordWrapping
}

You'll need to set some width constraints for this to have an effect.