• 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
UIWebView: Scale factor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIWebView: Scale factor


  • Subject: UIWebView: Scale factor
  • From: Phillip Mills <email@hidden>
  • Date: Fri, 25 Feb 2011 17:35:30 -0500

I'm loading files into a UIWebView on an iPad and need to be able to scroll them programatically to positions in the displayed files.  Many of these files are PDF, but generally it could be any of the types supported by loadRequest.  I'm able to do what I want using JavaScript if I set up my UIWebView with "scalesPagesToFit = NO".  However, doing that looks terrible.

The problem with allowing automatic scaling is that I know my scrolling requirements in screen units but JavaScript interprets them as document units.  Depending on the original file and the iPad orientation the error factors I've seen are in the 20-to-40% range.  How do I set "scalesPagesToFit = YES" and know what scaling was applied?

(I have a truly terrible hack in mind but I hope to be saved from that madness. :-) )


_______________________________________________

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

  • Prev by Date: NSProgressIndicator tintcolor
  • Next by Date: First Responder
  • Previous by thread: NSProgressIndicator tintcolor
  • Next by thread: First Responder
  • Index(es):
    • Date
    • Thread