SwiftEntryKit
SwiftEntryKit copied to clipboard
Edit Menu appears behind Swift Entry Kit when selecting text
So when I select text (in a WKWebView, but I've also seen this happen with normal UITextViews), the Edit Menu popup appears behind the View Controller that I've presented with Swift Entry Kit.
To Reproduce Steps to reproduce the behavior:
- Present custom view controller
- Select text in UITextView/WKWebView
- See error
Here's a screenshot:
The Edit menu appears in the back....
same issue....
@MichaelHuyp I ended up just presenting this normally, with present(_:animated:completion:)
.
@aheze
/**
Displays a given entry view using an attributes struct.
- A thread-safe method - Can be invokes from any thread
- A class method - Should be called on the class
- parameter view: Custom view that is to be displayed
- parameter attributes: Display properties
- parameter presentInsideKeyWindow: Indicates whether the entry window should become the key window.
- parameter rollbackWindow: After the entry has been dismissed, SwiftEntryKit rolls back to the given window. By default it is *.main* which is the app main window
*/
public class func display(entry view: UIView, using attributes: EKAttributes, presentInsideKeyWindow: Bool = false, rollbackWindow: RollbackWindow = .main) {
DispatchQueue.main.async {
EKWindowProvider.shared.display(view: view, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow)
}
}
RollbackWindow Appointed as keywindow Fixed this problem