0

Question Describe :

My App have 2 tabbar item . In the first Item , the viewcontroller have a view (the name is zpContainerView) ; a scrollView, it's zpContainerView's subView ; the scrollView add 3 subviews ;

Now , i touch the iphone's screen and change the scrollView's contentOffset ,

I click the second tabbar item , and soon after I click first tabbar item .

Question : Why does the scrollView automatically the contentOffset , why the contentOffset is CGPointZero ?

Please tell me why , and help me solve the question , thanks .

user5465320
  • 719
  • 2
  • 7
  • 15
  • I think you'd better upload a image for your views' layout. Cannot understand question easily. :( – Harrison Xi Jan 15 '16 at 09:55
  • Please post code of `viewWillAppear` or `viewDidAppear` – Saheb Roy Jan 15 '16 at 09:57
  • I find that If i click the second tabbar item , the scrollView did automatically call scrollView delegate and invoke [ scrollViewDidScroll: ] delegate method . I don't know why had happened ? – user5465320 Jan 16 '16 at 02:02

1 Answers1

0

I have resolved the problem 。

the ScrollView's class is not right .

Please look this : " UIScrollView * scrollView = [[UITableView alloc] init] ; "

user5465320
  • 719
  • 2
  • 7
  • 15