Graphics Programs Reference
In-Depth Information
Therefore, you must choose the appropriate event type to trigger the action message being
sent. In this case, you want the action message to be sent when the user taps on the view.
Configure this pop-up window to appear as it does in Figure 12.13 and click Connect .
Figure 12.13 Configuring a UIControl action
This will create a stub method in DetailViewController.m . Enter the following
code into that method.
- (IBAction)backgroundTapped:(id)sender
{
[[self view] endEditing:YES];
}
Build and run your application and test both ways of dismissing the keyboard.
 
Search WWH ::




Custom Search