Skip to content

Commit

Permalink
Fix yy_setBaselineOffset not work issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyin1986 committed Jan 8, 2020
1 parent 3bbccfe commit 058e762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions YYText/Utility/NSAttributedString+YYText.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 058e762

Please sign in to comment.