iPhone:Pinch animation for landscape view?
<p>I use the following code to handle pinch animation on an image. It works fine in Portrait mode. It does zoom the image in animation and animation comes with zoom out image. But, i am changing the view to landscape mode now as per the requirement, so the same pinch animation code does zooming the image, but the image turns to portrait from landscape.</p>

<p>Could someone help to resolve this issue?</p>

<pre><code>    -(void)HandlePinch :(UIPinchGestureRecognizer *)sender
{
     if ( mLastScale&gt;1.5 )
    {            
        // We have to launch another screen here..                     
        return;
    }
    // getting current scale value
    mCurrentScale += [sender scale] - mLastScale;
    mLastScale = [sender scale];

    if (sender.state == UIGestureRecognizerStateEnded)
    {
        mLastScale = 1.0;
    }
    // this is to pinch zoom
    CGAffineTransform currentTransform = CGAffineTransformIdentity;
    CGAffineTransform newTransform = CGAffineTransformScale(currentTransform, mCurrentScale, mCurrentScale);
    self.view.transform = newTransform;

}
</code></pre>
