                 let rotatedView: RotatedView = itemView as! RotatedView
                 
                 if index - 1 > 0 {
-                    rotatedView.backView?.foldingAnimation(animationInfo[index-1].type,
+                    rotatedView.backView?.foldingAnimation(kCAMediaTimingFunctionEaseOut,
                         from: CGFloat(-M_PI / 2),
                         to: 0,
-                        duration: animationInfo[index-1].duration,
+                        duration: durations[index-1],
                         delay: delay,
                         hidden: false)
-                    delay += animationInfo[index-1].duration
-                }
-
-                
-                if index < animationInfo.count {
-                    rotatedView.foldingAnimation(animationInfo[index].type,
-                                                        from:0,
-                                                        to: CGFloat(M_PI / 2),
-                                                        duration: animationInfo[index].duration,
-                                                        delay:delay,
-                                                        hidden:true)
-                    delay += animationInfo[index].duration
+                    delay += durations[index-1]
+                }
+
+                if index < durations.count {
+                    rotatedView.foldingAnimation(kCAMediaTimingFunctionEaseIn,
+                                                    from:0,
+                                                    to: CGFloat(M_PI / 2),
+                                                    duration: durations[index],
+                                                    delay:delay,
+                                                    hidden:true)
+                    delay += durations[index]
                 }
                 
                 index += 2

            if itemView is RotatedView {
                let rotatedView: RotatedView = itemView as! RotatedView
                rotatedView.alpha = 0;
                if index < animationInfo.count {
                    delay += animationInfo[index - 1].duration
                    rotatedView.foldingAnimation(animationInfo[index].type,
                                                from: CGFloat(M_PI / 2),
                                                to: 0,
                                                duration:
                                                animationInfo[index].duration,
                                                delay:delay,
                                                hidden:false)
                }
                if index+1 < animationInfo.count {
                    delay += animationInfo[index].duration
                    rotatedView.backView?.foldingAnimation(animationInfo[index + 1].type,
                                                from: 0,
                                                to: CGFloat(-M_PI / 2),
                                                duration: animationInfo[index+1].duration,
                                                delay: delay,
                                                hidden:true)
                }

    
    func closeAnimation() {
        
        let durations:[NSTimeInterval] = [
            0.13,
            0.13,
            0.13,
            0.13,
            0.165,
            0.165,]
    
        var index = 0
        var delay: NSTimeInterval = 0
