Skip to content

Commit

Permalink
fit ar
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchangqing authored and chenchangqing committed Jul 25, 2022
1 parent 7bd2aa4 commit 1b65c09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
5 changes: 5 additions & 0 deletions YYText/Component/YYTextLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,11 @@ + (YYTextLayout *)layoutWithContainer:(YYTextContainer *)container text:(NSAttri
// CoreText coordinate system
CGPoint ctLineOrigin = lineOrigins[i];

// https://github.com/ibireme/YYText/issues/930
if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
ctLineOrigin.x = 0;
}

// UIKit coordinate system
CGPoint position;
position.x = cgPathBox.origin.x + ctLineOrigin.x;
Expand Down

0 comments on commit 1b65c09

Please sign in to comment.