Getting the visible rect of an UIScrollView's content

前端 未结 8 512
故里飘歌
故里飘歌 2020-11-30 19:17

How can I go about finding out the rect (CGRect) of the content of a displayed view that is actually visible on screen.

myScrollView.bounds

8条回答
  •  生来不讨喜
    2020-11-30 19:37

    CGRect visibleRect;
    visibleRect.origin = scrollView.contentOffset;
    visibleRect.size = scrollView.frame.size;
    

提交回复
热议问题