Skip to content

ScrollView self contentOffset Point

xu_whale edited this page Dec 4, 2019 · 5 revisions

title: ScrollView:contentOffset(Point a) comments: false

简介

设置内容偏移量

  • @param a Point pt: 内容偏移量坐标, 这里把scrollView内容的左上角坐标看做原点origin(0, 0),pt即为相对origin的偏移量坐标 ⚠️ contentOffset,即内容偏移量,我们把scrollView内容的左上角坐标看做原点origin(0, 0),内容偏移量即为当前实现内容的左上角坐标pt与origin之间的差值contentOffset(pt.x - origin.x, pt.y - origin.y)
Clone this wiki locally