I have a UIScrollView with pagingEnabled on and I want to (using like a button or something) animated(ly) zoom to each page. I am using zoom to rect, but that's not working. Please help.
A:
Try the following to scroll a page
of the paged scroll view (assuming that all pages have equal width):
CGRect frame = scrollView.frame;
frame.origin.x = frame.size.width * page;
frame.origin.y = 0;
[scrollView scrollRectToVisible:frame animated:YES];
Felix
2010-01-12 12:59:32
+3
A:
Try to use - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
instead as you (probably) do not want to change view's zoom anyway.
Vladimir
2010-01-12 13:00:36