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

Adding any value for NSUnderlineStyleAttributeName causes NSParagraphStyle lineSpacing to be ignored #940

@bsmith11

Description

@bsmith11

Using ASTextNode, adding any value for NSUnderlineStyleAttributeName causes the lineSpacing value to be ignored in NSParagraphStyleAttributeName value objects. I have tested this using UILabel and it works correctly. Using ADK 1.9.3. Example:

NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineSpacing = 10.0f;
NSDictionary *attributes = @{NSForegroundColorAttributeName:[UIColor blackColor],
                             NSFontAttributeName:[UIFont systemFontOfSize:14.0f],
                             NSParagraphStyleAttributeName:paragraphStyle};
NSMutableAttributedString *mutableAttributedString = [[NSMutableAttributedString alloc] initWithString:@"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
                                                                                            attributes:attributes];

[mutableAttributedString addAttribute:NSUnderlineStyleAttributeName 
                                value:@(NSUnderlineStyleSingle)
                                range:NSMakeRange(10, 10)];

self.textNode.attributedString = mutableAttributedString;

screen shot 2015-12-14 at 12 46 12 pm

screen shot 2015-12-14 at 12 47 27 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions