I've got a UIScrollView
on my main ViewControler
. When it initially loads from startup the UIScrollview
is placed correctly but when I go to a modal view and then dismiss that modal view the UIScrollView
shifts up several pixels from the position that my UIScrollView
was at when I loaded the modal view (the amount of shift seems to be relative to the position of the UIScrollView
). So in other words if my UIScrollView
was all the way to the top it loads correctly if I was scrolled all the way to the bottom when I go to a modal view and then go back it seems to have shifted up approximately 20 to 30 pixels cutting the top of the content off in my UIScrollView
.
I cant figure out why its loading differently depending on the amount I've scrolled before loading the modal view.
- (void)viewDidLoad
{
[super viewDidLoad];
CGFloat scrollFrameHeight = [[UIScreen mainScreen] applicationFrame].size.height;
CGFloat scrollFrameWidth = [[UIScreen mainScreen] applicationFrame].size.width;
scrollView.frame = CGRectMake(0, 0, scrollFrameWidth, scrollFrameHeight);
}
FYI... I've tried using static numbers in place of my variables and I still get the strange shift.