我是一名新的iOS开发人员。我正在设置字段的动画,我想在字段中输入数据。我使用以下代码。
文字没有出现。它正在上升。请帮帮我。
if UIInterfaceOrientationIsLandscape(theStatusBarOrientation)
keyboardShiftAmount = keyboardFrame.size.width;
else
keyboardShiftAmount = keyboardFrame.size.height;
[UIView beginAnimations: @"ShiftUp" context: nil];
[UIView setAnimationDuration: keyboardSlideDuration];
NSLog(@"%f",keyboardShiftAmount);
self.view.center = CGPointMake(self.view.center.x,
self.view.center.y - keyboardShiftAmount);
[UIView commitAnimations];
viewShiftedForKeyboard = TRUE;