I have a UIViewController
that has a UIScrollView
as a root view defined and added like this
[self.view addSubview:mainScrollView];
UIScrollView *mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 64, screenWidth, screenHeight)];
I offset by 64 to start from the NavigationController
(20 status bar + 44 navigation bar) and it's all OK until now.
Then I add another ViewController
and when i go back the mainScrollView is offset in y by 64 points from the navigation controller. Why does this happen ?
Before:
After: