webView(_:shouldEndEditingIn:)
Returns whether the user should be allowed to end editing.
Declaration
optional func webView(_ webView: WebView!, shouldEndEditingIn range: DOMRange!) -> BoolParameters
- webView:
The web view that the user is editing.
- range:
Typically, the current selection, although it might not be. Use the
rangeparameter to help determine whether the user can end editing.
Return Value
true if the user should be allowed to end editing webView; otherwise, false. If this method returnstrue, webView ends editing and resigns as the first responder.
Discussion
This method is invoked when a web view attempts to resign as the first responder.