         border.translatesAutoresizingMaskIntoConstraints = false
         border.backgroundColor = UIColor.bubbleMine()
         
-        let image:UIImageView = UIImageView()
-        image.contentMode = UIViewContentMode.ScaleAspectFill
-        image.clipsToBounds = true
-        image.userInteractionEnabled = false
-        image.translatesAutoresizingMaskIntoConstraints = false
-        self.image = image
+        let imageView:UIImageView = UIImageView()
+        imageView.contentMode = UIViewContentMode.ScaleAspectFill
+        imageView.clipsToBounds = true
+        imageView.userInteractionEnabled = false
+        imageView.translatesAutoresizingMaskIntoConstraints = false
+        self.imageView = imageView
         
         addSubview(border)
-        addSubview(image)
+        addSubview(imageView)
         
         let views:[String:AnyObject] = [
             "border":border,
-            "image":image]
+            "imageView":imageView]
         
         let metrics:[String:AnyObject] = [
             "borderHeight":kBorderHeight]

class VChatDisplay:UIView
{
    weak var controller:CChat!
    weak var image:UIImageView!
    weak var layoutHeight:NSLayoutConstraint!
    let kMinHeight:CGFloat = 5
    private let kBorderHeight:CGFloat = 1
    
    convenience init(controller:CChat)
    {

            metrics:metrics,
            views:views))
        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat(
            "H:|-0-[imageView]-0-|",
            options:[],
            metrics:metrics,
            views:views))
        addConstraints(NSLayoutConstraint.constraintsWithVisualFormat(
            "V:|-0-[border(borderHeight)]-0-[imageView]-0-|",
            options:[],
            metrics:metrics,
            views:views))
    }
    
    //MARK: public
    
    func displayImage(image:UIImage)
    {
        imageView.image = image
        layoutHeight.constant = kMaxHeight
        
        UIView.animateWithDuration(kAnimationDuration)
        { [weak self] in
            
            self?.layoutIfNeeded()
        }
    }
    
    func removeImage()
    {
        layoutHeight.constant = kMinHeight
        
        UIView.animateWithDuration(kAnimationDuration, animations:
            { [weak self] in
                
                self?.layoutIfNeeded()
                
            })
        { [weak self] (done) in
            
            self?.imageView.image = nil
        }
    }
}