我是一名新的 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;