gpt4 book ai didi

iphone - 开始编辑时 Textview 无法向上移动

转载 作者:行者123 更新时间:2023-11-29 13:11:03 26 4
gpt4 key购买 nike

我在底部向上移动 UITextview 时遇到问题。

UITextField 正常工作,但 UITextView 不工作。

这是我的代码,当按下 TextView 时它会弹出工具栏。请帮忙

- (IBAction)HideKeyboard:(id)sender {
[self.myTextField resignFirstResponder];
[self.myTextView resignFirstResponder];
[self.myScrollView setContentOffset:CGPointZero animated:YES];
}

最佳答案

我假设您需要将 UITextView 移动到键盘上方,然后尝试以下方法

添加TPKeyboardAvoiding Framework到您的项目,它将负责将 UITextField 的UITextView 的 移动到键盘上方。

关于iphone - 开始编辑时 Textview 无法向上移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17356634/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com