Scenario
1)I start Editing keyboard comes.
2)Then I Touch a button
3)On botton touch I have Added AlertView,before adding i have resigned first responder
4)On click of AlertView OK Button I pop the viewController
5)after it pops then keyBoard Appears on that screen for a while and dismiss.
6)It should be dismissed on the same controller not on the previous controller
code -
- (IBAction)cancelSkipButtonTouchUpInside:(id)sender {
[self.textMobileNumber resignFirstResponder];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:@"Entered number will not be saved" delegate:self cancelButtonTitle:nil otherButtonTitles: @"OK",@"Cancel", nil];
alertView.tag = ktagYourNumberWillNotBeSaved;
[alertView show];
alertView = nil ;
}
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
case ktagYourNumberWillNotBeSaved:
{
[self.navigationController popToViewController:self animated:YES];
}
}