I have TextField in Custom Cell of UITableview .my Tableview is lower part of MainView so When i Click on TextField in CustomCell keyboard appear Which HIde my textfield.My below image show my problem

Here i have a Code which works when i have UITextField in MainView.please edit the Below Code Beacuse i want whole view Animation when i click on UITextfield.
-(void)textFieldDidBeginEditing:(UITextField *)textField {
if (textField.tag > 0) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:0.5];
[UIView setAnimationBeginsFromCurrentState:YES];
self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y-165.0,
self.view.frame.size.width, self.view.frame.size.height);
[UIView commitAnimations];
}
}
-(void)textresign{
[[self.view viewWithTag:1]resignFirstResponder];
}
-(void)textFieldDidEndEditing:(UITextField *)textField {
if (textField.tag > 0) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:0.5];
[UIView setAnimationBeginsFromCurrentState:YES];
self.view .frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+165.0,
self.view.frame.size.width, self.view.frame.size.height);
[UIView commitAnimations];
}
}
But i did’t know how to Fix it for my Custom cell UITextField.Any help will be appriated.
here is the code ,just need to change code little bit
use below method for repositioning the view on keyboard resigning instead of
textFieldDidEndEditing.using below method it mandatory to set the delegate to the textfield.
i hope you could get the solution.