Search code examples
iphoneipadviewdidloadviewdidappear

[self viewDidAppear:YES];


Does [self viewDidAppear:YES]; in the viewDidLoad section of code ensure that the viewDidAppear section of code will run?

Based on feedback from a small subset of our users, it appears for whatever reason that the code I have written in the viewDidAppear section of the main menu's view is not running for them - but it works perfectly well for the majority of users and in all my testing. I'm hoping that by adding [self viewDidAppear:YES]; this will fix the issue for those devices that for some reason were not calling viewDidAppear...

What do you guys think?


Solution

  • ViewDidAppear may not be getting called if its on a view controller that is nested in another view controller and running on an older OS. Before iOS 5, delegate commands did not always get forwarded to child controllers.