• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone] more UIScrollView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] more UIScrollView


  • Subject: [iPhone] more UIScrollView
  • From: Development <email@hidden>
  • Date: Tue, 1 Jun 2010 20:03:39 -0700

Ok, well I've worked out most of the other issues I've run in to. However the one I am now unable to really figure out has to do with zooming scroll view contents and winding up with a clear image. The problem is that I'm not getting a clear image.
Is it possible to use the built in zooming methods to zoom an image and keep it clear or do I have to basically implement my own zooming methods. I read the zooming docs and unfortunately they did not help me to understand what to do.

This is the drawing code from the view that is being zoomed.

-(void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context
{

	CGRect newRect = self.bounds;
	float scle =CGContextGetCTM(context).a;

	CGRect rect =CGContextGetClipBoundingBox(context);

	CGContextSaveGState(context);
	CGContextSetRGBFillColor(context, 1.0,1.0,1.0,1.0);
	CGContextFillRect(context,self.bounds);
	CGContextTranslateCTM(context, 0.0, newRect.size.height);
	CGContextScaleCTM(context, 1.0, -1.0);
	CGContextScaleCTM(context, scle,scle);

	CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(myPage, kCGPDFCropBox, newRect, 0, true);
	CGContextConcatCTM(context, pdfTransform);
	CGContextDrawPDFPage(context, myPage);

	CGContextRestoreGState(context);
}

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iPhone] more UIScrollView
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Base64 encoding (iPhone)
  • Next by Date: Best persistence method for a glossary app in iPhone?
  • Previous by thread: Re: UIWebView Background
  • Next by thread: Re: [iPhone] more UIScrollView
  • Index(es):
    • Date
    • Thread