TextFields没有出现

时间:2012-11-19 11:44:30

标签: ios objective-c cocoa-touch uiview uikit

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

1 个答案:

答案 0 :(得分:0)

使用uitextfielddelegate制作动画