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 に答える