     weak var layoutImageLeft:NSLayoutConstraint!
     weak var layoutImageRight:NSLayoutConstraint!
     private let kBarHeight:CGFloat = 50
+    private let kAnimateDuration:NSTimeInterval = 5
     
     convenience init(controller:CChatDisplayDetail)
     {

        let imageView:UIImageView = UIImageView()
        imageView.userInteractionEnabled = false
        imageView.translatesAutoresizingMaskIntoConstraints = false
        imageView.contentMode = UIViewContentMode.ScaleAspectFit
        imageView.clipsToBounds = true
        imageView.image = controller.image
        

        addConstraint(layoutImageBottom)
        addConstraint(layoutImageLeft)
        addConstraint(layoutImageRight)
    }
    
    //MARK: public
    
    func animateImage()
    {
        layoutImageTop.constant = 0
        layoutImageBottom.constant = 0
        layoutImageLeft.constant = 0
        layoutImageRight.constant = 0
        
        UIView.animateWithDuration(kAnimateDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
}