代码之家  ›  专栏  ›  技术社区  ›  user616076

我的水平滚动视图不工作

  •  0
  • user616076  · 技术社区  · 6 年前
    
    scrollView.delegate=自己
    
    
    

    编辑如下

    class HomeViewController: Container, UIScrollViewDelegate {..
    

    scrollview.contentSize = CGSize(width:1048, height:scrollview.frame.height)
    scrollview.delegate = self
    

    enter image description here

    当我运行应用程序时,它不会滚动。因为它不是uiviewController,所以我需要以不同的方式来处理它,还是我遗漏了其他一些东西?

    1 回复  |  直到 6 年前
        1
  •  0
  •   Dan Karbayev    6 年前

    View Scroll

    Constraints

    enter image description here

    UIScrollView