How to disable UIWebview horizontal scrolling?

前端 未结 7 1345
长情又很酷
长情又很酷 2021-02-05 14:48

I\'ve tried disabling it by inserting:


into my HTML string, and a dozen variations of th

7条回答
  •  我寻月下人不归
    2021-02-05 14:58

    Your web page needs to have two attributes: 1 -- the viewport meta tag and 2-- a width of 320px or less, including margin and padding.

    Here's a very bare HTML5 skeleton that should allow vertical scrolling and disallow horizontal scrolling, including disallowing horizontal bouncing. This also disallows zooming -- it assumes that your web page should always be shown 1-1 to the user. This is useful if you're using an UIWebView to show a user interface.

    
    
    
        
        
    
    
    
    

提交回复
热议问题