Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Setting UILabel's paragraph style linespacing resets alignment to left #83

@VilemKurz

Description

@VilemKurz

Set a textstyle like this to a UILabel

TextStyle(.paragraphStyle([.lineSpacing(2.0)]))

The label has alignment set to center in storyboard.
BUG: The label has aligment left after applying the text style. In other words, setting line spacing has a side effect, it resets alignment to left.
EXPECTED BEHAVIOUR: After setting linespacing, the label should keep its alignment setting without any change.

And vice versa. If you set alignment only, line spacing is reset. So, it is not possible to do this: TextStyle(.paragraphStyle([.alignment(.center)])) + TextStyle(.paragraphStyle([.lineSpacing(2.0)]))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions