내가 해결책을 찾을 수 있었다 상당한 시간 후, 동일한 문제가 되었습니까 .... 당신에게 도움이 될 수
- (있는 UIImage *) RotateImage : (있는 UIImage *) 이미지 :(float) 각도 { CGFloat angleInRadians = -1 * 각도 * (M_PI/180.0); CGAffineTransform transform = CGAffineTransformIdentity;
transform = CGAffineTransformMakeRotation(angleInRadians);
//transform = CGAffineTransformMakeScale(1, -1);
//transform =CGAffineTransformMakeTranslation(0,80);
CGRect rotatedRect = CGRectApplyAffineTransform(CGRectMake(0,0,Image.size.width,Image.size.height), transform);
UIGraphicsBeginImageContext(rotatedRect.size);
//[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
CGContextTranslateCTM(UIGraphicsGetCurrentContext(), 0,rotatedRect.size.height);
CGContextScaleCTM(UIGraphicsGetCurrentContext(),1, -1);
//CGContextTranslateCTM(UIGraphicsGetCurrentContext(), +(rotatedRect.size.width/2),+(rotatedRect.size.height/2));
CGContextTranslateCTM(UIGraphicsGetCurrentContext(), (rotatedRect.origin.x)*-1,(rotatedRect.origin.y)*-1);
CGContextRotateCTM(UIGraphicsGetCurrentContext(), angleInRadians);
//CGContextTranslateCTM(UIGraphicsGetCurrentContext(), -(rotatedRect.size.width/2),-(rotatedRect.size.height/2));
CGImageRef temp = [Image CGImage];
CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, Image.size.width,Image.size.height), temp);
//CGContextRotateCTM(UIGraphicsGetCurrentContext(), -angleInRadians);
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
//[viewImage autorelease];
return viewImage;
} 문제를 확대하기위한
는 .... 난 당신이 내가 그래서 응용 프로그램 창을 서브 클래 싱하는 방법을 보여줍니다이 웹 페이지를 볼 수있는 응용 프로그램 창
의 서브 클래스를 만들기 위해 노력하고 제안 탭을 관찰하고 해당 탭을 View Controller로 전달합니다. 당신을 도와줍니다
http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/
희망 ... 어이가
, 내가이 프로젝트에서 어느 정도 수준에서 해요,하지만 지금 문제는 PDF 파일의 줌 레벨로했다. PDF를 넣은 UIWebView의 배율을 조정 한 후 이미지를 PDF 위에 올려 놓으면 결과가 잘못 표시됩니다. 누구나 내 아이디어를 내줄 수 있습니까? –
문제를 좀더 명확하게 밝히면 도움이 될 것입니다. 가지고있는 코드 (당신이 가지고있는 것처럼 들린다)와 지금 당신이 얻는 결과, 그리고 그것이 예상했던 것과 다른 점을 보여주십시오. –