diff --git a/YYText/Utility/NSAttributedString+YYText.m b/YYText/Utility/NSAttributedString+YYText.m index 63f95799..0c702bbd 100755 --- a/YYText/Utility/NSAttributedString+YYText.m +++ b/YYText/Utility/NSAttributedString+YYText.m @@ -1056,7 +1056,11 @@ - (void)yy_setExpansion:(NSNumber *)expansion range:(NSRange)range { - (void)yy_setBaselineOffset:(NSNumber *)baselineOffset range:(NSRange)range { if (kSystemVersion >= 7) { +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0 + [self yy_setAttribute:(NSString *)kCTBaselineOffsetAttributeName value:baselineOffset range:range]; +#else [self yy_setAttribute:NSBaselineOffsetAttributeName value:baselineOffset range:range]; +#endif } }