今天再次遇到基于contentOffset的計(jì)算,發(fā)現(xiàn)不理解清楚這幾個(gè)概念互站,看到這方面的計(jì)算都是模模糊糊的私蕾。
contentSize
視圖全部展示出來的大小,相對于scrollow就是你 上下左右滑動出現(xiàn)的視圖的整體大小胡桃,不只是窗口大小
contentOffset
The point at which the origin of the content view is offset from the origin of the scroll view.
是指當(dāng)前顯示視圖contentview(假設(shè)這就是scrollow上展示出來的 視圖)的頂點(diǎn)踩叭,到contentSize((0,0翠胰,contentSize.width,contentSize,heigth))的頂點(diǎn)的位置容贝。
contentInset
contentInset用來獲取試圖在scrollView中的位置(這個(gè)理解 不知道正不正確。亡容。嗤疯。)