Disable UITableView vertical bounces when scrolling

后端 未结 5 1696
名媛妹妹
名媛妹妹 2020-12-06 09:05

How do I disable the bounce effect when vertically scrolling a UITableView? Right now if I scroll anywhere near the bottom, the view scrollbar bounces right up. I would like

相关标签:
5条回答
  • 2020-12-06 09:36

    If you want to do it programmatically, you can do it like that:

    self.myTableView.alwaysBounceVertical = NO;
    
    0 讨论(0)
  • 2020-12-06 09:42

    Have you tried setting the bounces property to NO?

    0 讨论(0)
  • 2020-12-06 09:43

    You can use the below code with swift 4.x.x

    self.myTableView.alwaysBounceVertical = false
    
    0 讨论(0)
  • 2020-12-06 09:48

    swift 5:

    self.tableView?.alwaysBounceVertical = false
    
    0 讨论(0)
  • 2020-12-06 09:55

    With the help of interface:

    Uncheck the Bounce Vertically property of UITableView

    enter image description here

    0 讨论(0)
提交回复
热议问题