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

[tvOS] 'kCTParagraphStyleSpecifierLineSpacing' is unavailable: not available on tvOS #784

Open
AndrewBarba opened this issue May 22, 2018 · 0 comments

Comments

@AndrewBarba
Copy link

AndrewBarba commented May 22, 2018

In TTTAttributedLabel.m I'm getting this error at line 176:

CTParagraphStyleSetting paragraphStyles[12] = {
    {.spec = kCTParagraphStyleSpecifierAlignment, .valueSize = sizeof(CTTextAlignment), .value = (const void *)&alignment},
    {.spec = kCTParagraphStyleSpecifierLineBreakMode, .valueSize = sizeof(CTLineBreakMode), .value = (const void *)&lineBreakMode},
    // 'kCTParagraphStyleSpecifierLineSpacing' is unavailable: not available on tvOS
    {.spec = kCTParagraphStyleSpecifierLineSpacing, .valueSize = sizeof(CGFloat), .value = (const void *)&lineSpacing},
    {.spec = kCTParagraphStyleSpecifierMinimumLineSpacing, .valueSize = sizeof(CGFloat), .value = (const void *)&minimumLineHeight},
    {.spec = kCTParagraphStyleSpecifierMaximumLineSpacing, .valueSize = sizeof(CGFloat), .value = (const void *)&maximumLineHeight},
    {.spec = kCTParagraphStyleSpecifierLineSpacingAdjustment, .valueSize = sizeof (CGFloat), .value = (const void *)&lineSpacingAdjustment},
    {.spec = kCTParagraphStyleSpecifierLineHeightMultiple, .valueSize = sizeof(CGFloat), .value = (const void *)&lineHeightMultiple},
    {.spec = kCTParagraphStyleSpecifierFirstLineHeadIndent, .valueSize = sizeof(CGFloat), .value = (const void *)&firstLineIndent},
};

Commenting out line 176 allows the framework to build properly on tvOS 11

@AndrewBarba AndrewBarba changed the title 'kCTParagraphStyleSpecifierLineSpacing' is unavailable: not available on tvOS [tvOS] 'kCTParagraphStyleSpecifierLineSpacing' is unavailable: not available on tvOS May 22, 2018
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

No branches or pull requests

1 participant