美文网首页
contentSize、contentInset和content

contentSize、contentInset和content

作者: 三十一_iOS | 来源:发表于2016-06-29 16:17 被阅读164次

今天再次遇到基于contentOffset的计算,发现不理解清楚这几个概念,看到这方面的计算都是模模糊糊的。

contentSize

视图全部展示出来的大小,相对于scrollow就是你 上下左右滑动出现的视图的整体大小,不只是窗口大小

contentOffset

The point at which the origin of the content view is offset from the origin of the scroll view.

是指当前显示视图contentview(假设这就是scrollow上展示出来的 视图)的顶点,到contentSize((0,0,contentSize.width,contentSize,heigth))的顶点的位置。

contentInset

contentInset用来获取试图在scrollView中的位置(这个理解 不知道正不正确。。。)

相关文章

网友评论

      本文标题:contentSize、contentInset和content

      本文链接:https://www.haomeiwen.com/subject/ldrxjttx.html