amratab / FlexibleSteppedProgressBar

Flexible Stepped Progress Bar for IOS
Other
575 stars 113 forks source link

feat(label): Add alignment and height options #44

Open marcusorjames opened 1 year ago

marcusorjames commented 1 year ago

This is referencing #39 and #7

I had a similar problem inheriting a codebase that used this library.

A requirement was for the text to be multiline and centered.

Multiline is achieved by multiplying up the height of the textLayer Centering is achieved by leveraging the textLayer.alignmentMode

I have made these into properties that can be set.

I only needed it for bottom, but added it to top as well. Wasn't where to put center, guessing it might be the default renderTextIndexes.

Comments on variable naming and approach welcome, but thought that it might aid people with the same issue