天蓬老师2017-04-18 09:52:49
Simple UIView animations can be used.
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) {
// 动画完成后的回调
}];