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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing & Baseline Offset Unit String #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

im-jersh
Copy link

I've added properties to allow placing the unit string to the left or the right (default) of the value string. In using this library in my own project that heavily uses currencies, I found that the default position of the unit string to the right of the value was not appropriate for currencies that have leading unit characters. The unitTrailing property will place the unit string to the right (by default or if this value is YES/true) or to the left (NO/false).

Also, in looking through the open issues for this library, I noticed somebody had requested adjusting the unit string's baseline offset. The unitBaselineOffset property value will offset the unit string's baseline by the input value.

Both new properties are IBInspectable.

It should be noted that extreme unitBaselineOffset values (either positive or negative) can force the baseline offset of the value portion of the string in the opposite direction.

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

Successfully merging this pull request may close these issues.

1 participant