I use some code found on this forum and I apologise that I don’t have the author’s details recorded to call ResignFirstResponder in an extension method:
Public Sub ClearFocus(extends c as iOSControl)
Declare Sub resignFirstResponder Lib "Foundation.Framework" selector "resignFirstResponder"(obj_id As Ptr)
resignFirstResponder(c.handle)
End Sub