Rocky
Rocky

Reputation: 1423

how to hide keyboard on modelview in ipad?

how to hide keyboard when we using UIModalPresentationFormSheet in this when i click on keyboard done button my keyboard is not hidden from modelview what theproblem in this code i calling some wrong way this class

-(IBAction)BenefitManage
{
    manage*theManageView=[[[manage alloc]initWithNibName:@"manage" bundle:nil]autorelease];
    [theManageView setDelegate:self];
    theManageView.navigationItem.title =NSLocalizedString(@"Manage", @"Manage");
    navController = [[UINavigationController alloc] initWithRootViewController: theManageView]; 
    navController.modalPresentationStyle=UIModalPresentationFormSheet;
    //theManageView.modalPresentationStyle = UIModalPresentationFormSheet;
   // [self presentModalViewController:theManageView animated:NO];
    [self presentModalViewController:navController animated:YES];

}

Upvotes: 0

Views: 119

Answers (2)

sunkehappy
sunkehappy

Reputation: 9101

You should hide the keyboard when the done button is clicked.

- (IBAction)done
{
    [self.textField resignFirstResponder];
    ...
}

Upvotes: 1

Paresh Navadiya
Paresh Navadiya

Reputation: 38249

Just do this:

[self.view endEditing:YES];

Upvotes: 0

Related Questions