我正在尝试制作动画并使用下面的代码.我得到“无法使用类型’的参数列表调用’animateWithDuration'(FloatLiteralConvertible,延迟:FloatLiteralConvertible,选项:UIViewAnimationOptions,动画:() – >() – > $T4,完成:(Bool) – > ;(Bool) – > $T5)’“错误.
这意味着我使用了错误的参数.我错了.请帮忙.我无法真正解决它.
var basketTopFrame = CGRect() basketTopFrame = dropPlace.frame var mytimer : NSTimer = NSTimer .scheduledTimerWithTimeInterval(2.0,target: self,selector: "restart",userInfo: nil,repeats: false) UIView.animateWithDuration(1.0,delay: 0.1,options: UIViewAnimationOptions.CurveEaseIn,animations: { var pickPlace = basketTopFrame },completion: {(finished: Bool) in mytimer })
提前致谢.