What is the use of the contentOffset
property in UIScrollView
?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
According to the documentation, the
contentOffset
property represents:In plain speak, it's how far the view has moved in each direction (vertical and horizontal). You can unpack vertical and horizontal distance by accessing the
x
andy
properties of theCGPoint
:It could be considered as the coordinate of the origin of
scrollView
's frame relative to the origin of itscontentView
's frame. See the picture below: