как я могу получить x позицию contentOffset?
вот мой код, но в журнале всегда 0
- (void)adjustAreaScroll:(NSNotification *)notification
{
int value = [[notification object] intValue];
NSLog(@"adjustAreaScroll, %i", value);
switch (value) {
case 0:
[topScroll setContentOffset:CGPointMake(0, 0)];
break;
case 1:
[topScroll setContentOffset:CGPointMake(1024, 0)];
break;
case 2:
[topScroll setContentOffset:CGPointMake(2048, 0)];
break;
case 3:
[topScroll setContentOffset:CGPointMake(3072, 0)];
break;
}
NSLog(@"target position -----> %i", self.topScroll.contentOffset.x);
}