[英]Make a model (prototype) view xcode swift
您可能应该使用这样的方法来指定要制作动画的视图
@IBOutlet weak var viewToFlip: UIView!
@IBAction func actionFlipView(sender: AnyObject) {
// don't forget to specify your options
UIView.transitionWithView(viewToFlip, duration: 2.0, options: .TransitionFlipFromRight, animations: {
// set here any specific animation
}) { (finished) in
//here should be final steps for you animation
}
}
否则,您可以使用这种方法来精确地自定义动画。 UIView.animateKeyFramesWithDuration(_:delay:options:animations:completion)
希望这对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.