0

I have NSUserDefaults setValue inside my viewDidLoad event. When I set the value of a key using the following code then viewDidLoad is fired again.

 [ud setValue:@"YES" forKey:@"isFoo"];

Should the viewDidLoad fire after setting the user default value?

Lebyrt
  • 1,376
  • 1
  • 9
  • 18
azamsharp
  • 19,710
  • 36
  • 144
  • 222
  • 1
    If it is only firing a second time it might be a bug, http://stackoverflow.com/questions/5462481/why-is-viewdidload-called-twice-when-the-rootviewcontroller-property-of-uiwindow – Joe Sep 19 '11 at 20:33
  • What is the stack trace? You should be able to determine exactly why this is firing a second time. Use a breakpoint. – Sam Sep 19 '11 at 20:37

0 Answers0