Hello I have two UITextFields in my application, and want to dismiss the keyboard when I just touch anywhere except the UITextFields how can I do this?
You need to define the action for your button click this way
[infoButton addTarget:self action:@selector(backButtonClicked) forControlEvents:UIControlEventTouchUpInside];
And implement the click method ,as for example i have provided the animation on button click method.
-(void)backButtonClicked
{
[UIView beginAnimations:@"animation" context:nil];
[UIView setAnimationDuration:1.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
[self.navigationController popViewControllerAnimated:YES];
[UIView commitAnimations];
}
Hope this will help you ,the action is without using IB.Its all done through coding