title: Changing View size using user touch input
body: <p>I want to change my view size using user touch input.</p>
  
  <p>What I know and will be trying is using TouchesMoved method and then finding the nearest vertex of the view to the touch, make the view increase in that direction using animation.</p>
  
  <p>But there are few problems I have before I start.</p>
  
  <p>1) The camera app has same functionality in cropping photo. There is a grid displaying actual crop area. I don't know how to display that grid. I don't have any knowledge of opengl. I would like to have that as a indication of user is in edit mode?</p>
  
  <p>2) The camera app crop functionality is also of changing the size using user touch input but it only changes view size, if the touch is near the four vertices of the view. From what I know there is a method to check if the touch is in a specific rect <strong>CGRectContainsPoint</strong> but how do I filter it to bounds of the view?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I tried yinkou answer, downloaded from Git.</p>
  
  <p>Now the real question is in the git Xcode project. There is a view which has image as a contentView and if user drag that view, the image also changes shape based on view resizing.</p>
  
  <p>I am doing this in a camera app. I attached AVCaptureVideoPreviewLayer as a contentView. Now my view is resizing but the AVCaptureVideoPreviewLayer stays the same size. Am I doing something wrong or is it that AVCaptureVideoPreviewLayer won't increase?</p>