在 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
}];
}