I can't figure out the proper syntax for calling the UIView method animateWithDuration. I've found some examples where others have had similar problems, and the solutions for those don't seem to work in the most recent version of Swift, 2.0. I'm getting this generic error:
Cannot invoke 'animateWithDuration' with an argument list of type '(duration: Double, delay: Double, options: UIViewAnimationTransition, animations: ()->_, completion: nil)'
I believe I've narrowed the problem down to the "animations:" parameter. Here is my code:
UIView.animateWithDuration(duration: 0.2,
delay: 0.0,
options: UIViewAnimationTransition.FlipFromLeft,
animations: {
// Hide image here
},
completion: nil)
Any suggestions would be appreciated, thanks.