嗨我有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,? –
是的,但我問了這個問題。 –