iphone - subView从屏幕底部向上滑动

标签 iphone ios uiview addsubview

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

目前我的代码如下所示

//..
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];

关于iphone - subView从屏幕底部向上滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10908143/

相关文章:

ios - 在带有分页的 ScrollView 中拥有多个 tableView 会使 tableHeaderView 的 searchBar 不可触摸

ios - 错误-ITMS-9000 : Bundle identifier cannot be changed

ios - 如何根据 UIDatePicker 语言设置 NSDateFormatter

ios - 享受 UIView 动画和 UIView 翻转的乐趣

ios - "Also create xib file"按钮禁用

ios - 当屏幕在同一个 View Controller 中旋转时替换 UIViews

iphone - 如何使用 Phonegap 在 iPhone 应用程序的 jquery mobile 中设置固定位置背景图像

iphone - 单屏两个UITableView

ios - 在 iOS 中使用 Geocoder 类根据地址获取经纬度

ios - MKMarkerAnnotationView 不显示