UIGraphicsImageContext: both dimensions must be > 0

This commit is contained in:
James Magahern
2023-04-19 11:40:57 -07:00
parent f8d19414d5
commit dca5aca1ce
4 changed files with 6 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ class FindOnPageViewController: UIViewController, _WKFindDelegate
findOnPageView.textField.addAction(UIAction(handler: { [unowned self] _ in
self.findString = findOnPageView.textField.text
webView?._find(self.findString, options: self.findOptions, maxCount: self.maxCount)
webView?._find(self.findString, options: self.findOptions, maxCount: Int(self.maxCount))
}), for: .editingChanged)
findOnPageView.prevResultButton.addAction(UIAction(handler: { [unowned self] _ in
@@ -82,13 +82,13 @@ class FindOnPageViewController: UIViewController, _WKFindDelegate
@objc
override func findNext(_ sender: Any?) {
webView?._find(self.findString, options: self.findOptions, maxCount: self.maxCount)
webView?._find(self.findString, options: self.findOptions, maxCount: Int(self.maxCount))
}
@objc
override func findPrevious(_ sender: Any?) {
let options: _WKFindOptions = self.findOptions.union(.backwards)
webView?._find(self.findString, options: options, maxCount: self.maxCount)
webView?._find(self.findString, options: options, maxCount: Int(self.maxCount))
}
func _webView(_ webView: WKWebView!, didFailToFind string: String!) {