How do I stop a UIScrollView from bouncing horizontally?

后端 未结 11 1805
名媛妹妹
名媛妹妹 2021-02-05 12:07

I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag

11条回答
  •  天涯浪人
    2021-02-05 12:15

    My version for webViews, a common solution:

    - (void)webViewDidFinishLoad:(UIWebView *)webView {
    
    [webView.scrollView setContentSize: CGSizeMake(webView.frame.size.width, webView.scrollView.contentSize.height)];
    
    }
    

提交回复
热议问题