How can I scale the content of a WebView?
A:
A WebView is an NSView, so one way would be to send it a scaleUnitSquareToSize:
message.
Peter Hosey
2010-02-02 03:21:14
Because a WebView is actually a fairly complex set of managed nested views, you actually can't just call `-scaleUnitSquareToSize:` on the main `WebView` object.
Rob Keniger
2010-02-02 04:55:27
+1
A:
You need to call -scaleUnitSquareToSize:
on the document view of the individual frame that you want to resize, for example the main frame:
[[[[webView mainFrame] frameView] documentView] scaleUnitSquareToSize:NSMakeSize(1.5, 1.5)];
[[[[webView mainFrame] frameView] documentView] setNeedsDisplay:YES];
Rob Keniger
2010-02-02 04:54:24