【发布时间】:2016-06-11 06:11:48
【问题描述】:
我一直在尝试为我在 Main.StoryBoard 上创建的 UIView 设置动画。
我在我的 ViewController.h 文件中为它创建了插座。
@property (strong, nonatomic) IBOutlet UIImageView *Player;
我尝试的动画是:
- (void) PlayerMoves {
[UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveLinear animations: self.Player.center = CGPointMake(self.Player.center.x, self.Player.center.y -50) completion:nil];
}
无论我做什么,它都会告诉我我有一个错误。
将“CGPoint”(又名“struct CGPoint”)发送到不兼容类型“void (^ _Nonnull)(void)”的参数
【问题讨论】:
-
如果我遗漏了一些我需要包含的内容,请告诉我。感谢高级家伙!
-
感谢您的链接,感谢所有帮助过的人。
标签: ios objective-c uiview uiviewcontroller uiviewanimation