放大和缩小在WebView Cocoa [英] Zooming in and out in WebView Cocoa
本文介绍了放大和缩小在WebView Cocoa的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我的代码:
[[[[webView mainFrame] frameView] documentView] scaleUnitSquareToSize:NSMakeSize(1.5,1.5)];
[[[[webView mainFrame] frameView] documentView] setNeedsDisplay:YES];
确定它工作,webView做缩放,但鼠标选择位置有偏移 。
Ok it work, webView did scale, but mouse selection position has offset.
如何解决?
推荐答案
你需要访问documentView?
Why do you need to access the documentView?
[[[webView mainFrame] frameView] scaleUnitSquareToSize:NSMakeSize(1.5,1.5)];
同样适用。
这篇关于放大和缩小在WebView Cocoa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文