如何在 UIScrollView 内的 UIWebView 上启用放大功能? [英] How can I enable zoom in on UIWebView which inside the UIScrollView?

查看:15
本文介绍了如何在 UIScrollView 内的 UIWebView 上启用放大功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UIWebViewUIScrollView 里面(scrollview 包含另一个组件)

I have a UIWebView which inside a UIScrollView (scrollview contain another component)

我尝试在 UIWebView 上的 Interface BuilderProgrammatic 上启用多点触控,但它仍然无法缩放 html,我需要处理吗都放大 UIScrollViewUIWebView?还是我没有设置的东西?

I tried to enable multitouch both on Interface Builder or Programmatic on UIWebView but it still cannot zoom for html, do I need to handle both zoom in at the UIScrollView and UIWebView? Or anything I haven't to set?

推荐答案

您必须设置 scalesPageToFit=YES 才能在 UIWebView 上进行任何捏合和缩放

You MUST set scalesPageToFit=YES for any pinching and zooming to work on a UIWebView

这篇关于如何在 UIScrollView 内的 UIWebView 上启用放大功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆