沒有辦法知道你沒有一些代碼在做什麼,但你應該嘗試這樣的事:
- (void) animateTextField: (UITextView*) textView up: (BOOL) up
{
const int movementDistance = 80; // tweak as needed
const float movementDuration = 0.3f; // tweak as needed
int movement = (up ? -movementDistance : movementDistance);
[UIView beginAnimations: @"anim" context: nil];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationDuration: movementDuration];
self.view.frame = CGRectOffset(self.view.frame, 0, movement);
[UIView commitAnimations];
}
從那裏你覺得appropiate調用此(UIKeyboardWillShowNotigication,例如),以及它會動畫您的視圖,以顯示文本視圖。
也許不是視頻,你可能會發布一些代碼? – PengOne 2011-06-13 15:06:47