How to hide keyboard in Xamarin.iOS on press of navigationBar

VenkataSwamyVenkataSwamy INMember ✭✭✭


I am facing the above problem Please help me on that, Thanks in advance
The below code is working for View Tap but I want to do hide Keyboard on NavigationBar Click also

            var viewTap = new UITapGestureRecognizer(() => {
       viewTap.CancelsTouchesInView = false;


  • TedRogersTedRogers USMember ✭✭✭✭

    @BalaRaju the usually way to do this is the track what UITextField is active using the UITextFieldDelegate or event handlers and listen to TextFieldDidBeginEditing and TextFieldDidEndEditing to store and clear the active text field. Then just call ResignFirstResponder() on your active text field if you have one.

Sign In or Register to comment.