         imageView = UIImageView(image: image)
         let rotatedView = RotatedView(frame: imageView.frame)
         rotatedView.tag = 1
+        rotatedView.layer.anchorPoint = CGPoint.init(x: 0.5, y: 0)
+        rotatedView.layer.transform = rotatedView.transform3d()
         
         rotatedView.addSubview(imageView)
         animationView?.addSubview(rotatedView)

    }
    
    func createAnimationView() {
        let anAnimationView = UIView(frame: containerView.frame)
        anAnimationView.backgroundColor = UIColor.blackColor()
        anAnimationView.translatesAutoresizingMaskIntoConstraints = false
//        anAnimationView.alpha = 0.3
        self.contentView.addSubview(anAnimationView)
        
        // copy constraints from containerView

        }
        
        containerView.alpha = 0;
        
        // added back view
        var previusView: RotatedView?
        for contener in animationView!.subviews.sort({ $0.tag < $1.tag }) {
            if contener is RotatedView && contener.tag > 0 && contener.tag < animationView!.subviews.count {
                let rotatedView = contener as! RotatedView
                previusView?.addBackView(rotatedView.bounds.size.height, color: backViewColor)
                previusView = rotatedView
            }
        }
        
        animationItemViews = createAnimationItemView()
    }
    
    // MARK: public
    
    public func selectedAnimation(isSelected: Bool, animated: Bool, completion: CompletionHandler?) {
        
        if isSelected {
            
            if animated {
                containerView.alpha = 0;
                openAnimation(completion: completion)
            } else  {
                foregroundView.alpha = 0
                containerView.alpha = 1;
            }
            
        } else {
            if animated {
                closeAnimation(completion: completion)
