0

I have a custom view which contains UITextField's.

When user clicks on the text field, numeric KeyPad pops up.

But I need the KeyPad to disappear when "user" clicks anywhere else outside the textField's in the view....

Can anyone help me out...

Thanks in advance.

Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
Ajay
  • 1
  • 1

2 Answers2

0

You could overlay the rest of the view with a transparent view. If a user touches that, you just call resignFirstResponder and hide the transparent view.

Joseph Tura
  • 6,290
  • 8
  • 47
  • 73
0

got to interface builder and change the class property of the view from uiview to uicontrol and then make a method which includes [object resign firstresponder] .now connect that method to the the view.

like -(ibaction)remove:(id)sender{

testfield resigh firstresponder;

}

Pankaj Kainthla
  • 2,439
  • 5
  • 31
  • 61