Skip to content

Commit bafb63b

Browse files
authored
Merge pull request #30 from p-x9/feature/release-window-when-keyboard-is-shown
fix to release point windows when keyboard is displayed
2 parents 5e5595f + 3900036 commit bafb63b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Sources/TouchTracker/Cocoa/TouchTrackingUIView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public class TouchTrackingUIView: UIView {
164164
pointWindows[touches.count..<pointWindows.count].forEach {
165165
$0.isHidden = true
166166
$0.windowScene = nil
167-
$0.removeFromSuperview()
167+
$0.uiviewRemoveFormSuperView()
168168
}
169169
pointWindows = Array(pointWindows[0..<touches.count])
170170
}

Sources/TouchTracker/Extension/UIWindow+.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,10 @@ extension UIWindow {
7676
}
7777
}
7878

79+
extension UIWindow {
80+
func uiviewRemoveFormSuperView() {
81+
super.removeFromSuperview()
82+
}
83+
}
84+
7985
#endif

0 commit comments

Comments
 (0)