Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

numberOfLines is not available in latest version #101

Closed
mkeremkeskin opened this issue Mar 6, 2019 · 5 comments
Closed

numberOfLines is not available in latest version #101

mkeremkeskin opened this issue Mar 6, 2019 · 5 comments

Comments

@mkeremkeskin
Copy link

With the latest version, ability to change numberOfLines is removed as I see. I was able to use it with version 0.8.

After I looked to the code I found the way below for setting it. It's not the ideal way I guess but it works for me 馃槃

for element in segmentedControl.segments {
      ((element as! LabelSegment).normalView as! UILabel).numberOfLines = 2
      ((element as! LabelSegment).selectedView as! UILabel).numberOfLines = 2
}

Is there any more preferred way for doing this, if so can you please guide me?

Thanks already.

@mkeremkeskin mkeremkeskin changed the title numberOfLines numberOfLines is not available in latest version Mar 8, 2019
@gmarm
Copy link
Owner

gmarm commented Mar 14, 2019

I would add the numberOfLines in the LabelSegment if you intend to fork, or create a new custom segment for your use case.

@mkeremkeskin
Copy link
Author

New custom segment can be a good idea, thanks for the suggestion.

@Md-Rais
Copy link

Md-Rais commented Apr 2, 2019

Hi, Thanks for this great tool.
I am in need of number of lines option in the segmented control. Please let me know if there is any other way to set large text as segment title. Thanks

@SDPrio
Copy link

SDPrio commented May 2, 2019

I am also missing the MultiLine option from version 0.8. While creating a custom segment could be a solution I think this is a quite common use case and it would be great if it would included in the default LabelSegement

@gmarm
Copy link
Owner

gmarm commented Jun 12, 2019

Fixed as part of #112.

@gmarm gmarm closed this as completed Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants