可使用简单的 UIView 动画。 UIView *myView = [[UIView alloc] init]; myView.frame = CGRectMake(0, 0, 50, 50); myView.backgroundColor = [UIColor blackColor]; [self.view addSubview:myView]; [UIView animateWithDuration:2.0 animations:^{ // 2 秒内向右移动 100, 向下移动100。 myView.transform = CGAffineTransformMakeTranslation(100, 100); } completion:^(BOOL finished) { // 动画完成后的回调 }];
可使用简单的 UIView 动画。