【发布时间】:2012-08-08 05:34:57
【问题描述】:
如何在 iPhone 应用程序中加载视图时执行滑动动画?
我有一个 ViewController,其中有子视图。我希望子视图加载动画,从左向右滑动。
到目前为止我得到了这个代码:
-(void) showAnimation{
[self.view addSubview:geopointView]
geopointView.frame = CGRectMake(20,150,550,200)// somewhere offscreen, in the direction you want it to appear from
[UIView animateWithDuration:10.0
animations:^{
geopointView.frame = CGRectMake(20,150,550,200)// its final location
}];
}
【问题讨论】:
标签: iphone ipad uiview uiviewanimation