I know here is a place to fire issues.
But I don't know where to ask questions, so I put it here.
override func perform() {
let sourceViewController = self.sourceViewController as! ViewController
let destinationViewController = self.destinationViewController as! ImageSlideShowViewController
let layer = destinationViewController.view.layer
layer.pop_removeAllAnimations()
NSLog("Layer frame X: %f", layer.frame.origin.x);
NSLog("Layer frame width: %f", layer.frame.size.width);
let xAnim = POPSpringAnimation(propertyNamed: kPOPLayerPositionX)
let sizeAnim = POPSpringAnimation(propertyNamed: kPOPLayerSize)
xAnim.fromValue = 320
xAnim.springBounciness = 16
xAnim.springSpeed = 10
// About 20% of it's normal size
sizeAnim.fromValue = NSValue(CGSize: CGSizeMake(64, 114))
xAnim.completionBlock = { (_, _) in
NSLog("Animation has completed.");
NSLog("Layer frame X: %f", layer.frame.origin.x);
};
layer.pop_addAnimation(xAnim, forKey:"position")
layer.pop_addAnimation(sizeAnim, forKey:"size")
sourceViewController.navigationController?.pushViewController(destinationViewController, animated:false)
but when I click the cell, perform executes 3 times.
can not reproduce in the original objectivec project.