views:

42

answers:

3

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.

A: 

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
A: 

there is a similar post were you will get your answer: here

Gyani
yes solves the issue almost.... thanks
Ajay
A: 

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