我在 Xcode 7 beta 2 中输入了一些简单的动画代码-
UIView.animateWithDuration( 0.5, delay: 1, options: nil, animations: ({
self.W.frame = CGRect(x: 107, y: 268, width: 30, height: 33)
self.nameLabel.alpha = 0
self.wd.alpha = 0
} ), completion:{ finished in
UIView.animateWithDuration(0.5, animations: ( { ()-> Void in self.wd.alpha = 1 } ), completion: {finished in
UIView.animateWithDuration(0.5, delay: 1, options: nil, animations: ({()-> Void in
self.greenLaunchScreenView.alpha = 0
self.nameLabel.alpha = 0
self.wd.alpha = 0
self.W.alpha = 0
self.launchScreenCircle.alpha = 0
self.navigationController?.setNavigationBarHidden( false, animated: true )
}), completion: nil )
}
)})
当我在 Xcode 6 中键入相同的代码时,它可以完美运行,但它在 Xcode 7 beta 2 中不起作用,因为它给了我一个错误-“表达式类型不明确,没有更多上下文”。如何使此代码在 Xcode 7 beta 中工作?