Skip to content

Commit 1e41a08

Browse files
authored
Merge pull request #200 from MontakOleg/rtl
Use effectiveUserInterfaceLayoutDirection
2 parents 3d651bb + 4022206 commit 1e41a08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Extensions/UIView+PinLayout.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ extension UIView: Layoutable, SizeCalculable {
8080
public func isLTR() -> Bool {
8181
switch Pin.layoutDirection {
8282
case .auto:
83-
if #available(iOS 9.0, *) {
83+
if #available(iOS 10.0, tvOS 10.0, *) {
84+
return effectiveUserInterfaceLayoutDirection == .leftToRight
85+
} else if #available(iOS 9.0, *) {
8486
return UIView.userInterfaceLayoutDirection(for: semanticContentAttribute) == .leftToRight
8587
} else if let shared = UIApplication.value(forKey: "sharedApplication") as? UIApplication {
8688
return shared.userInterfaceLayoutDirection == .leftToRight

0 commit comments

Comments
 (0)