【发布时间】:2015-10-29 11:21:10
【问题描述】:
在我的应用程序中,我有一个包含 UITableView 和内部 UITableview 的表单,我放置了多个 UITextField 和 UITextView。
每当我点击 UITextfield 或 UITextView 键盘时就会出现。
当用户点击他们想要输入数据的UITextField 时,我可以将TextFiled 向上移动。但是当用户想要输入数据时,我现在可以向上移动 TextView。
以下是我的代码:
-(void)viewDidLoad
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardFrameDidChange:)
name:UIKeyboardDidChangeFrameNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillHide:)
name:UIKeyboardWillHideNotification object:nil];
}
谁能帮我把UITextView UP 移到键盘上方?
提前致谢。
【问题讨论】:
标签: ios objective-c iphone ios8 xcode6