Remove Label from the framework
NickEntin opened this issue · 5 comments
Label
doesn't really belong in Paralayout anymore. It was originally very helpful in working around some quirks in UILabel
that made it difficult to align text properly to match the output of design tools. Many of those original issues have been resolved over the years, however, and so it is no longer providing much value in terms of layout. While it still provides additional functionality on top of UILabel
, Paralayout is a layout framework and the functionality included should be scoped to only layout tools when possible.
If the Label
functionality is still useful to external consumers, we can consider moving it to its own micro-framework. If you use it and would be interested in this, please speak up. For now I propose that we remove it from the Paralayout entirely.
If the Label functionality is still useful to external consumers, we can consider moving it to its own micro-framework.
Please! Found this library looking for this functionality specifically.
Cheers 😄
@edwellbrook Glad to hear you're finding it useful! Was there specific functionality in Label
that you were looking for? Curious what the current use cases are, so we can make sure to preserve that functionality.
Thanks!
Honestly mostly interested in LineWrapBehavior
. Though I can see myself using the lineSpacingDistance
property at some point too.
Thank you!
Hi @NickEntin. Does Paralayout still offer a way to balance multiple lines of text in a UILabel? Was previously using the Label class + LineWrapBehavior = .compact
to have multi-line labels where each line was roughly equal length.
Perhaps that's surfaced somewhere else in the project, or is it just no longer available at all? Thanks!
Hey @edwellbrook, after a lot of discussion we decided to remove the Label
class and all of its functionality not directly related to layout from the 1.0 release, since it felt disjoint to the rest of the framework. If we bring it back in the future, I think we would actually want to publish Label
as a separate framework more focused on text handling, rather than adding it back into Paralayout.
For now, I'd recommend copying Label.swift from the 0.9.1 release into your project. I think it should work standalone from any other changes in the Paralayout 1.0 release.