I have implemented an UIScrollView delegate as:
- (void) scrollViewDidScroll: (UIScrollView *) scrollView {
CGRect bounds = scrollView.bounds ;
CGPoint scrollLoc = scrollView.contentOffset ;
NSLog(@"bounds: %@ offset:%@"
, NSStringFromCGRect(bounds)
, NSStringFromCGPoint(scrollLoc)) ;
}
And whatever I do, scrolling or rotating the device, it seems that contentOffset
and bounds.origin
are always the same.
Why do we need a contentOffset if that is the same as the bounds origin, or what is the case when both are actually different?