嗨我有UITextView,我希望它的高度正好在键盘上方。我想提出一个笔记应用程序,我需要携带的UITextView了所以滚动easily.Here是代码:UITextView没有正确定位
CGRect keyboardBounds = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGRect frame = self.notesTextView.frame;
CGFloat height = self.notesTextView.frame.size.height;
height = frame.size.height;
frame.size.height -= keyboardBounds.size.height;
self.notesTextView.frame = frame;
但是画面原来是这样的:
难道你没有问这里同样的问题http://stackoverflow.com/questions/17513713/keyboard-covering-uitextview-in-notes-app/17513863#17513863,? –
是的,但我问了这个问题。 –