add textfield delegate and auto hide keyboard