2

我正在尝试创建一个动画,该动画是我放入屏幕视图之外的视图框架中的视图。然后我想将它从当前帧位置动画到屏幕上方的新位置......

目前我的代码看起来像这样

//..
ButtonOneViewController *b1VC = [[ButtonOneViewController alloc] initWithNibName:@"ButtonOneViewController" bundle:[NSBundle mainBundle]];

    UIView *animatedActionView = [[UIView alloc] initWithFrame:CGRectMake(10.0, 490.0, 300.0, 380.0)]; //off screen
    [animatedActionView addSubview:b1VC.view];
    [otherNav.view insertSubview:animatedActionView belowSubview:tbView];
// what do I do to animate it up to a position of (10.0, 10.0, 300.0, 380.0)

任何帮助将不胜感激。

4

1 回答 1

4

试试这个:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
//Change your frame here.
[UIView commitAnimations];
于 2012-06-06T04:29:10.390 回答