Programmatically scroll a UIScrollView

前端 未结 9 1124
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 15:52

I have a UIScrollView which has several views. When a user flicks their finger, the view scrolls to the right or left depending on the direction of the finger f

9条回答
  •  渐次进展
    2020-11-29 16:25

    With Animation in Swift

    scrollView.setContentOffset(CGPointMake(x, y), animated: true)
    

提交回复
热议问题