PROBLEM SOLVED! STUPID TYPO IN MY CODE!
That's my method of my UIScrollView delegate:
- (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView {
NSLog(@"contentOffset: %f", activeScrollView.contentOffset);
}
Output in console is like:
2009-05-06 23:04:45.731 Demo[4851:20b] contentOffset: 21080643979530096233938944.000000
for sure my contentOffset isn't so huge ;)
From stackoverflow
-
Because contentOffset is a CGPoint.
Thanks : Thanks! Damn, I really believed I had that .x there!! Thanks for that hint. What a stupid typo! -
contentOffset returns a CGPoint struct, so you'd want to use
activeScrollView.contentOffset.yinstead of trying to pass the entire struct into %f, which is the format specifier for doubles. -
use NSLog(@"ContenfOffset : %@", NSStringFromCGPoint(activeScrollView.contentOffset));
0 comments:
Post a Comment