Skip to content

Commit

Permalink
不管rtl,还是ltr计算方式保持一致
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchangqing committed Jul 25, 2022
1 parent 83c6343 commit 2179487
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions YYText/Component/YYTextLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,8 @@ + (YYTextLayout *)layoutWithContainer:(YYTextContainer *)container text:(NSAttri
CGPoint ctLineOrigin = lineOrigins[i];

// https://github.com/ibireme/YYText/issues/930
if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
ctLineOrigin.x = 0;
}
// 不管rtl,还是ltr计算方式保持一致
ctLineOrigin.x = 0;

// UIKit coordinate system
CGPoint position;
Expand Down

0 comments on commit 2179487

Please sign in to comment.