title: Decrease the width of a view with animation
body: <p>Hi all I am facing an strange issue . I want to increase the width of a view on click of a button with animation which is working fine in my case. The code I am using to increase the width is below-</p>
  
  <pre><code>    @IBAction func increaseWidth(_ sender: AnyObject) {
  
        UIView.animate(withDuration: 1.0, delay: 0, options:
         [.allowUserInteraction], animations: {
  
              print("Animation function animateStuff() started!")
  
              let frmPlay : CGRect = self.nameLbl.frame
              let originXbutton = frmPlay.origin.x
              let originYbutton = frmPlay.origin.y
              let originWidthbutton = frmPlay.size.width
              let originHeightbutton = frmPlay.size.height
  
             self.nameLbl.frame =  CGRect(origin: CGPoint(x: originXbutton,y :originYbutton), size: CGSize(width: originWidthbutton+100, height: originHeightbutton))
  
  
          }, completion: { finished in
  
      })
  }
  </code></pre>
  
  <p>But the code which is use by me not decreasing the width with animation.It is just decreasing the width.The code which is used by to decrease the width is below-</p>
  
  <pre><code>@IBAction func decreaseWidth(_ sender: AnyObject) {
  
  
      UIView.animate(withDuration: 1.0, delay: 0, options:
          [.allowUserInteraction], animations: {
  
              print("Animation function animateStuff() started!")
  
              let frmPlay : CGRect = self.nameLbl.frame
              let originXbutton = frmPlay.origin.x
              let originYbutton = frmPlay.origin.y
              let originWidthbutton = frmPlay.size.width
              let originHeightbutton = frmPlay.size.height
  
              // self.nameLbl.frame = frmPlay
              self.nameLbl.frame =  CGRect(origin: CGPoint(x: originXbutton,y :originYbutton), size: CGSize(width: originWidthbutton-100, height: originHeightbutton))
  
  
  
          }, completion: { finished in
  
      })
  
  }
  </code></pre>
  
  <p>Please help where I am going wrong. </p>