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

Fix for issue #68 with title and message text alignment #118

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

Conversation

funnel20
Copy link

@funnel20 funnel20 commented Jan 26, 2018

This solves issue #68 with title and message alignment:

  • The solution it to use the same width for both UILabels. This will be the largest value of the 2 expected widths based on the text content.
  • The available width for the UILabel was too large; the style.horizontalPadding wasn't respected.

Here is the before (left) and after (right) when using style.titleAlignment = NSTextAlignmentCenter;:

original-hor-padding-10-sbs

It also solves a problem that the UILabel is not resizing when using horizontalPadding:

original-hor-padding-70-sbs

* The key it to use the same width for both UILabels. This will be the largest value of the 2 expected widths based on the text content.
* The available width for the UILabel was too large; the style.horizontalPadding wasn't respected.
@funnel20
Copy link
Author

funnel20 commented Jan 29, 2018

@scalessec Hi, any reaction would be appreciated.

It would be a shame when my similar solution as @shidelinFYH provided 2 years ago (see:
#68 (comment)) wouldn't be finally merged in your project, as it solves 2 issues.

@funnel20
Copy link
Author

funnel20 commented Feb 5, 2018

Hello?

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