UIWebView: Scale factor
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