How to handle keyboard event globally in a single place

In my app, the keyboard hides most of the data in the page. In android there is a back button to hide keyboard. but in ios it does not have an option to hide…

So what am aiming for is , whenever the user clicks the ‘Go’ button in the keyboard, the keyboard has to close. Can somebody help me achieve this ?. It would be better if i could write the code for this globally so that it gets affected in every page…