The frame where the UISearchBar is drawn is the following:
UISearchBar *sBar=[[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 280, 40)];
Simply i want to dismiss the keyboard when the user click on ANY area than the area defined above.
Is there any UISearchBar delegate method to do so, or a simple way. Thanx in advance.
You’ll need to handle click/touch events on the other views in your window, and call:
sBar will need to be a property of your UIViewController
To handle touch events, add these to your UIViewController:
and call [sBar resignFirstResponder] from at least the touchesBegan method.