iOS7:tableview中的可编辑文本字段单元格无法正常工作

时间:2013-09-27 05:52:18

标签: objective-c ios7

Editable textfield cells Tableview is causing problem on keyboard tab button everytime it is calling textfieldshouldbeginediting even if i am in first textfield it is not going to nextfield.

它将持续文本字段,如果popover可用,它将崩溃。如何解决这个问题,如果输入tab然后它必须在textfielddidendediting中重新签名当前响应者,它不应该转到textfieldshouldbegin编辑。

-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
  PickerViewController *selectOperatorController;
  NSLog(@"tag %d",textField.tag);
  return NO;
}
I also declared textfield delegates like didendediting and shouldendediting
-(BOOL)textFieldShouldEndEditing:(UITextField *)textField
{
  activeField = nil;
  if (self.chooseOperatorController) {
     [self.chooseOperatorController dismissPopoverAnimated:YES];
  }
  return YES;
}   
This is not as issue in iOS 6.But it is in iOS 7.

1 个答案:

答案 0 :(得分:1)

textfieldshouldbegin编辑将不允许桌面键盘选项卡按钮输入,它无法判断在textfields之间移动。如果我们添加textfielddidbeginediting我们可以移动控件,虽然我们有两种方法我们可以使用键盘tab移动。所以textfielddidbeginediting是必需的如果我们想在可用的文本字段之间移动。