Skip to content

Commit

Permalink
Enable backwards compatibility when compiling with Xcode 14
Browse files Browse the repository at this point in the history
This will still mean that the bug addressed in #314 will persist, but will allow consumers bound to older Xcode versions to continue to update the rest of the codebase and its dependencies
  • Loading branch information
eliperkins committed Nov 30, 2023
1 parent 64aecb2 commit 9f89df4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Runestone/Library/UITextInput+Helpers.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import UIKit

#if compiler(>=5.9)

@available(iOS 17, *)
extension UITextInput where Self: NSObject {
var sbs_textSelectionDisplayInteraction: UITextSelectionDisplayInteraction? {
Expand All @@ -17,3 +19,5 @@ extension UITextInput where Self: NSObject {
return interactionAssistant.value(forKey: selectionViewManagerKey) as? UITextSelectionDisplayInteraction
}
}

#endif
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import UIKit

#if compiler(>=5.9)

@available(iOS 17, *)
extension UITextSelectionDisplayInteraction {
func sbs_enableCursorBlinks() {
setValue(true, forKey: "rosruc".reversed() + "Blinks")
}
}

#endif

0 comments on commit 9f89df4

Please sign in to comment.