How to add PageCurl animation in overlay using Swift

120 Views Asked by At

Here is some code for a PageCurl animation. It works in action methods, but I want it to animate inside an overlay:

let animation = CATransition()

//Set transition properties
animation.type = CATransitionType(rawValue: "pageCurl")
animation.subtype = .fromTop
animation.duration = 2.0 
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut);

imageView.layer.add(animation, forKey: "animation")
0

There are 0 best solutions below