             metrics:metrics,
             views:views))
         addConstraints(NSLayoutConstraint.constraints(
-            withVisualFormat:"V:|-0-[imageView]-0-|",
-            options:[],
-            metrics:metrics,
-            views:views))
-        addConstraints(NSLayoutConstraint.constraints(
             withVisualFormat:"V:[border]-0-[marks]-0-|",
             options:[],
             metrics:metrics,

    
    private func layoutImage()
    {
        if imageView.image == nil
        {
            layoutHeight.constant = kMinHeight
            layoutBorderHeight.constant = kBorderHeight
        }
        else
        {

            
            if screenWidth < screenHeight
            {
                newHeight = maxHeight
                newBorderHeight = kBorderHeight
            }
            else
            {
                newHeight = 0
                newBorderHeight = 0
            }
        }
        
        if newHeight != layoutHeight.constant
        {
            animate = true
        }
        
        if animate
        {
            layoutHeight.constant = newHeight
            layoutBorderHeight.constant = newBorderHeight
            
            UIView.animate(withDuration:kAnimationDuration)
            { [weak self] in
                
                self?.superview?.layoutIfNeeded()
            }
        }
    }
    
