title: How to resize the UIView when CGAffineTransformIdentity
body: <p>I am doing an app which has a feature to rotate and re size a view. i have implemented this feature but i do face an issue.</p>
  
  <p><strong>My problem</strong></p>
  
  <p>The View wil be resized when dragging its four corners, after resizing it i can rotate the view in both directions.</p>
  
  <p>Once the rotation is done, if i try again to resize the view by dragging its corner, the view's size gone to unpredictable value and its moving all around the screen.</p>
  
  <p>I googled lot finally i got the following solution</p>
  
  <pre><code>The frame property is undefined when transform != CGAffineTransformIdentity, as per the docs on UIView
  </code></pre>
  
  <p>I saw one app which has implemented the feature exactly what i wish to implement.</p>
  
  <p>How can i resize the UIView after rotation of UIView</p>
  
  <p><strong>My code for resize the view</strong></p>
  
  <p><strong>Touches Began</strong></p>
  
  <pre><code>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
  
     UITouch *touch = [[event allTouches] anyObject];
  
     NSLog(@"[touch view]:::%@",[touch view]);
  
     touchStart = [[touches anyObject] locationInView:testVw];
     isResizingLR = (testVw.bounds.size.width - touchStart.x &lt; kResizeThumbSize &amp;&amp;     testVw.bounds.size.height - touchStart.y &lt; kResizeThumbSize);
     isResizingUL = (touchStart.x &lt;kResizeThumbSize &amp;&amp; touchStart.y &lt;kResizeThumbSize);
     isResizingUR = (testVw.bounds.size.width-touchStart.x &lt; kResizeThumbSize &amp;&amp;      touchStart.y&lt;kResizeThumbSize);
     isResizingLL = (touchStart.x &lt;kResizeThumbSize &amp;&amp; testVw.bounds.size.height -touchStart.y &lt;kResizeThumbSize);    
  }
  </code></pre>
  
  <p><strong>Touches Moved</strong></p>
  
  <pre><code>- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
  CGPoint touchPoint = [[touches anyObject] locationInView:testVw];
  CGPoint previous=[[touches anyObject]previousLocationInView:testVw];
  
  float  deltaWidth = touchPoint.x-previous.x;
  float  deltaHeight = touchPoint.y-previous.y;
  
  NSLog(@"CVTM:%@",NSStringFromCGRect(testVw.frame));
  
  
  if (isResizingLR) {
   testVw.frame = CGRectMake(testVw.frame.origin.x, testVw.frame.origin.y,touchPoint.x +   deltaWidth, touchPoint.y + deltaWidth);
   }  
  if (isResizingUL) {
   testVw.frame = CGRectMake(testVw.frame.origin.x + deltaWidth, testVw.frame.origin.y +  deltaHeight, testVw.frame.size.width - deltaWidth, testVw.frame.size.height - deltaHeight);
   } 
  if (isResizingUR) {
    testVw.frame = CGRectMake(testVw.frame.origin.x ,testVw.frame.origin.y + deltaHeight,  testVw.frame.size.width + deltaWidth, testVw.frame.size.height - deltaHeight);      
   } 
  if (isResizingLL) {
   testVw.frame = CGRectMake(testVw.frame.origin.x + deltaWidth ,testVw.frame.origin.y ,  testVw.frame.size.width - deltaWidth, testVw.frame.size.height + deltaHeight);   
  }
  
  if (!isResizingUL &amp;&amp; !isResizingLR &amp;&amp; !isResizingUR &amp;&amp; !isResizingLL) {
  testVw.center = CGPointMake(testVw.center.x + touchPoint.x - touchStart.x,testVw.center.y + touchPoint.y - touchStart.y);
   }
  
   }
  </code></pre>