Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 输入文本字段未在键盘上方移动_Ios_Swift_Uitextfield_Uitabbarcontroller - Fatal编程技术网

Ios 输入文本字段未在键盘上方移动

Ios 输入文本字段未在键盘上方移动,ios,swift,uitextfield,uitabbarcontroller,Ios,Swift,Uitextfield,Uitabbarcontroller,您好,我使用JSQMessagesViewController SDK作为聊天功能,我不认为我的问题与他们的SDK有关,当我进入聊天控制器并单击文本字段时,键盘会出现,而不是文本字段 我的聊天列表嵌入在TabBarController中。 当我点击另一个选项卡,然后返回聊天视图控制器时,文本字段现在会根据需要在键盘上方移动 当我调用UIImagePickerControllerDelegate(更改聊天的照片)时,该错误也会发生 我的代码: func imagePickerControll

您好,我使用JSQMessagesViewController SDK作为聊天功能,我不认为我的问题与他们的SDK有关,当我进入聊天控制器并单击文本字段时,键盘会出现,而不是文本字段

我的聊天列表嵌入在TabBarController中。 当我点击另一个选项卡,然后返回聊天视图控制器时,文本字段现在会根据需要在键盘上方移动

当我调用UIImagePickerControllerDelegate(更改聊天的照片)时,该错误也会发生 我的代码:

 func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {
        imageOfChat.image = image
        self.dismissViewControllerAnimated(true, completion: nil)
 }
在这里,我也可以通过点击TabBarController中的其他选项卡来摆脱这个bug

有没有办法以编程方式重现此“单击选项卡”操作


感谢您的帮助。

尝试使用
[textfield becomefirstresponseder]。尝试使用
[textfield BecomeFirstResponseOrder]开始编辑。