Hi
I have a pdf file inside a web view. I need to resize it now to fit the full screen. I am able to rotate the image but not resize it. I found many information but couldn't find anything more clear. I am using the below method to rotate.
Code:
-(void)orientationDidChange:(NSNotification*)notification{
self.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
UIDeviceOrientation orientation = thisDevice.orientation;
CGFloat angle;
switch (orientation) {
case 1: //UIDeviceOrientationPortrait
angle = 0.0f;
break;
case 2: //UIDeviceOrientationPortraitUpsideDown
angle = M_PI;
break;
case 3: //UIDeviceOrientationLandscapeLeft
angle = M_PI_2;
break;
case 4: //UIDeviceOrientationLandscapeRight
angle = -M_PI_2;
break;
default:
break;
}
[UIView animateWithDuration:0.5f animations:^{
webView.transform = CGAffineTransformMakeRotation(angle);}];
}
Any help is appreciated.
Thanks