Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: What gets called after viewDidLoad before viewWillAppear?

Really strange behaviour here. I've got a view with a scroll view inside, which contains my interface.

In my viewDidLoad, I set the frame of my scrollView to have an origin of 0,0.

I log the origin at the end of my viewDidLoad, and it's 0. However, at the start of my viewWillAppear, the origin is -20. Does anyone know what kind of method could get called that would do this?

Thanks in advance

like image 672
Alex Coplan Avatar asked Jul 25 '11 19:07

Alex Coplan


1 Answers

You are correct with the current method precedence:

-(void)loadView;
-(void)viewDidLoad;
-(void)viewWillAppear;
-(void)viewDidAppear;

Is there perhaps a rotation call or some other method in the way, such as didRotateToInterfaceOrientation; for example? Also, is this scroll view part of a controller that's loaded from a nib file?

like image 121
Luke Avatar answered Oct 11 '22 18:10

Luke