title: How to reload image in UIButton in applicationDidBecomeActive
body: <p>I have a MenuViewController that loads when the app loads up; it is the root view of a UINavigationController. </p>
  
  <p>Within the view I have a UIButton with an image that loads from a URL, as well as a label (its a picture indicating the weather and the current temp.).</p>
  
  <p>Everything works fine, but if I am using the app on an iPhone 4, with multi-tasking, when the home button is pressed and then the app is reopened, I need the UIButton image and temp. label to reload.</p>
  
  <p>I have tried calling this in my AppDelegate under applicationDidBecomeActive:</p>
  
  <pre><code>[self parseWeatherXML]; //re-parse weather data
  [menuViewController reloadWeatherData]; //loads the image/label from the XML
  </code></pre>
  
  <p>with no luck. </p>
  
  <p>I have also tried releasing menuViewController in applicationWillResign, then reallocating menuViewController in applicationDidBecomeActive so the viewDidLoad method gets called again, both ways just end up crashing my app.</p>
  
  <p>Any help appreciated!</p>
  
  <p>EDIT
  Heres my method that gets called with the notification:</p>
  
  <pre><code>- (void)reloadWeather
  {
  [self parseWeatherXML];
  UIImage *img = [UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString:iconURL]]];
  if (img != nil) 
  { 
      NSLog(@"setting image");
      [weatherButton setImage:img forState:normal];
      img = nil; 
  }
  currentTemp = [currentTemp stringByAppendingString:@"°F"];
  [tempLabel setText:currentTemp];
  tempLabel.adjustsFontSizeToFitWidth = YES;
  if([self isIPad])
  {
      tempLabel.textAlignment = UITextAlignmentRight;
      [tempLabel setFont: [UIFont systemFontOfSize: 45.0]];
  }
  
  currentTemp = nil;
  }
  </code></pre>