subView 从屏幕底部向上滑动 [英] subView Slide up from bottom of the screen
本文介绍了subView 从屏幕底部向上滑动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个动画,该动画是我已放入屏幕视图之外的视图框架中的视图.然后我想将它从当前帧位置动画到屏幕更高的新位置...
I am trying to create an animation that is a view i have put into a view frame outside of the screen view. Then I would like to animate it from the current frame location to a new location higher up the screen...
目前我的代码是这样的
//..
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];
这篇关于subView 从屏幕底部向上滑动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文