-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dca2f5
commit 292859a
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#if canImport(AppKit) | ||
import AppKit | ||
#elseif canImport(UIKit) | ||
import UIKit | ||
#endif | ||
|
||
#if os(iOS) || os(tvOS) || os(macOS) | ||
|
||
@available(iOS 15.0, macOS 12.0, tvOS 15.0, *) | ||
extension NSTextLocation { | ||
public static func < (lhs: Self, rhs: Self) -> Bool { | ||
return lhs.compare(rhs) == .orderedAscending | ||
} | ||
|
||
public static func == (lhs: Self, rhs: Self) -> Bool { | ||
return lhs.compare(rhs) == .orderedSame | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters