Hide input view(like keyboard) without first responder.
Some time we need to hide input view without using [firstResponder resignFirstResponder]
.
Like we have 5 to 10 textField and we don’t know which is first responder or we want to hide input view from part of code which can not access first responder. Or some time first responder is in there party library. In all this case we can use following line to hide input view.
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
Written by Chintan R Dave
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ios
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#