出现键盘时偏移UITableView内容

嗨我得到的错误:属性'editingIndexPath'没有find对象的types'ViewController *'与行:
[self.tableView scrollToRowAtIndexPath:self.editingIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];

这个错误与这个调用有关: self.editingIndexPath

我将如何解决这个错误?

 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; } - (void)keyboardWillShow:(NSNotification *)notification { CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; UIEdgeInsets contentInsets; if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) { contentInsets = UIEdgeInsetsMake(0.0, 0.0, (keyboardSize.height), 0.0); } else { contentInsets = UIEdgeInsetsMake(0.0, 0.0, (keyboardSize.width), 0.0); } self.tableView.contentInset = contentInsets; self.tableView.scrollIndicatorInsets = contentInsets; [self.tableView scrollToRowAtIndexPath:self.editingIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES]; } - (void)keyboardWillHide:(NSNotification *)notification { self.tableView.contentInset = UIEdgeInsetsZero; self.tableView.scrollIndicatorInsets = UIEdgeInsetsZero; } 

编译器告诉你一切。 只需定义一个editingIndexPath属性。

 @property(nonatomic, strong) NSIndexPath *editingIndexPath