I found the solution, the problem was, that i inited the components in layoutsubviews...
iOS: SetContentOffset for Scrollview doesn't work
-
27-11-2021 - |
Pregunta
I have 3 Scrollviews and they should scroll synchron with the other...
But this code doesn't work:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
[rowIdCellScrollView setContentOffset:CGPointMake(0, contentScrollView.contentOffset.y)];
[headerScrollView setContentOffset:CGPointMake(contentScrollView.contentOffset.x, 0)];
}
Solución 2
Otros consejos
Do you have UIScrollViewDelegate? And set delagate:
rowIdCellScrollView.delegate = self;
And does this scrollViewDidScroll even call?
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow