子视图从屏幕底部向上滑动
我试图创build一个animation,这是一个视图,我把它放在屏幕视图之外的视图框架中。 然后,我想将它从当前帧位置animation到屏幕上方的新位置。
目前我的代码看起来像这样
//.. 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)
任何帮助将不胜感激。
尝试这个:
[UIView beginAnimations:nil context:nil]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; //Change your frame here. [UIView commitAnimations];