I put UIScrollView on View.
UIScrollView includes a UIView Customed.
When I click a button, I hope to see UIView’s top point.
When I used UITableView, my using code is like this :
[self.tableListView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
But, this code is able to work UIView on UIScrollView.
[self.scrollView setContentOffset:CGPointMake(0, 0 )];
This code is found through web searching.
But, this code doesn’t work.
In other words, I want to see top of UIView on UIScrollview not top of UIScrollView.
Thanks!~~~
scrollRectToVisible is also available for UIScrollView
Get the frame of the UIView and and use it as a parameter
EDIT:
Could try: