Skip to content

Commit 40b3ae5

Browse files
authored
Merge pull request #32 from p-x9/feature/property-for-show-above-keyboard-window
Add property to indicate whether mark should be displayed above keyboard
2 parents 1ca480c + 98d9a9d commit 40b3ae5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Sources/TouchTracker/Cocoa/TouchTrackingUIView.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ public class TouchTrackingUIView: UIView {
4444
public var displayMode: DisplayMode
4545

4646
/// A boolean value that indicates whether the event should propagate across windows.
47-
/// If set to `true`, the touch events received in one window will also be shared
48-
/// with other windows when applicable.
47+
///
48+
/// If set to `true`, touch events received in other windows will be propagated to this window as well.
4949
public var shouldPropagateEventAcrossWindows: Bool = false
5050

51+
/// A boolean value that indicates whether display marks above keyboard window
52+
///
53+
/// If you want touched marks to appear above the keyboard, set this value to `true`
54+
///
55+
/// When displaying a view above the keyboard window, handling is required that is different from normal.
56+
public var shouldDisplayAboveKeyboardWindow: Bool = false
57+
5158
var touches: Set<UITouch> = []
5259
var locations: [CGPoint] = [] {
5360
didSet {
@@ -201,7 +208,7 @@ public class TouchTrackingUIView: UIView {
201208
window.center = .init(x: globalLocation.x + offset.x,
202209
y: globalLocation.y + offset.y)
203210

204-
if shouldPropagateEventAcrossWindows,
211+
if shouldDisplayAboveKeyboardWindow,
205212
let screen = self.window?.screen,
206213
let keyboardScene = UIWindowScene.keyboardScene(for: screen),
207214
let keyboardRemoteWindow = keyboardScene.allWindows.first {

0 commit comments

Comments
 (0)