Created
June 3, 2024 05:00
-
-
Save ryotapoi/a473f13b08b0e95cab27e02c0acdc69e to your computer and use it in GitHub Desktop.
最前面表示を実現するためにUIWindowを使う
This file contains hidden or 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
class ToastWindow: UIWindow { | |
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { | |
let view = super.hitTest(point, with: event) | |
if view == self { | |
return nil | |
} else { | |
return view | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment