title: How to show/hide UIImageView when I want
body: <p>I'm having a little problem with an iPhone app I'm currently developing. 
  When the user touch a button, it calls an IBAction named refreshQuestion, which is supposed to show an image hover the screen to ask the user to wait a moment, then it has to call another function, and finally it has to hide the image.</p>
  
  <p>The problem is that the image won't appear. As well as the network activity indicator.</p>
  
  <p>Any help?</p>
  
  <p>Here is the code : </p>
  
  <pre><code>- (IBAction)refreshQuestion:(id)sender{
  pleaseWait.hidden = NO;
  [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;    
  [self loadData];
  pleaseWait.hidden = YES;
  [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; 
  </code></pre>
  
  <p>}</p>
  
  <p>EDIT : 
  Here is my LoadData function : </p>
  
  <pre><code>- (void)loadData{   
  NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
  NSString * idUtilisateur = [userDefaults objectForKey:@"idUtilisateur"];
  
  NSString * stringUrlQuestion = [NSString stringWithFormat:@"http://www.mywebsiteURL"];
  
  NSURL * urlQuestion = [NSURL URLWithString:stringUrlQuestion];
  QuestionParser * parser = [[QuestionParser alloc] init];
  [parser parseXMLAtURL:urlQuestion parseError:nil] ;
  int nbQuestions = [parser.arrayOfQuestion count];
  [parser release];
  
  NSFetchRequest *requete = [[NSFetchRequest alloc] init];
  NSEntityDescription *entite = [NSEntityDescription entityForName:@"Question" inManagedObjectContext:self.managedObjectContext];
  [requete setEntity:entite];
  
  NSSortDescriptor * sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"idQuestion" ascending:YES];
  NSArray * sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
  [requete setSortDescriptors:sortDescriptors];
  [sortDescriptor release];
  [sortDescriptors release];
  
  NSError * error;
  NSMutableArray *mutableFetchResult = [[self.managedObjectContext executeFetchRequest:requete error:&amp;error] mutableCopy];
  [requete release];
  if(mutableFetchResult == nil){
      NSLog(@"Erreur viewWillAppear : %@", error);
  }
  
  questionDuJour = [mutableFetchResult objectAtIndex:0];
  
  if (nbQuestions == 0){
      UIAlertView* alertViewConnection = [[UIAlertView  alloc] initWithTitle:@"Error" message:@"Error while retreiving data" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [alertViewConnection show];
      [alertViewConnection release];
  }
  
  
  NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init];
  [outputFormatter setDateFormat:@"EEEE d MMMM"];
  NSLocale * localisation = [[[NSLocale alloc] initWithLocaleIdentifier:@"fr_FR"] autorelease]; 
  [outputFormatter setLocale:localisation];
  
  labelJour.text = [NSString stringWithFormat:@"%@",[outputFormatter stringFromDate:questionDuJour.dateQuestion]];
  textQuestion.text = questionDuJour.textQuestion;
  citation.text = [NSString stringWithFormat:@"%@",questionDuJour.citation];
  labelAuteur.text = [NSString stringWithFormat:@"%@",questionDuJour.auteur];
  
  [outputFormatter release];
  NSLog(@"stop animating");
  </code></pre>
  
  <p>}   </p>