title: Updating the text of a UIlabel
body: <p>I have a slide display that gathers a series of images from a database. Each image has descriptions and other properties associated with it. Basically I want to update the text of a UILabel every time a new image is loaded. How can I do that? </p>
  
  <p>Here is what I am working with:   </p>
  
  <pre><code> //SLIDE MENU
  - (void)loadVisiblePages {
      // First, determine which page is currently visible
      CGFloat pageWidth = gridView.frame.size.width;
      NSInteger page = (NSInteger)floor((gridView.contentOffset.x * 2.0f + pageWidth) / (pageWidth * 2.0f));
      //NSArray * descriptArray[20];
  
      // Update the page control
      pageControl.currentPage = page;
  
      // Work out which pages you want to load
      NSInteger firstPage = page - 1;
      NSInteger lastPage = page + 1;
  
      // Purge anything before the first page
      for (NSInteger i=0; i&lt;firstPage; i++) {
          [self purgePage:i];
      }
      for (NSInteger i=firstPage; i&lt;=lastPage; i++) {
          [self loadPage:i];
          // descriptArray[i] = selectedPhotoDesc;
      }
      for (NSInteger i=lastPage+1; i&lt;self.pageImages.count; i++) {
          [self purgePage:i];
      }
  }
  
  
  - (void)loadPage:(NSInteger)page {
      NSURL* imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@%@/%@.jpg", host, photoPath, collection, photoNumber]];
  
      //get photo from server
      NSData *imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
      UIImage *image = [[UIImage alloc] initWithData: imageData];
  
      if (page &lt; 0 || page &gt;= 20) {
          return;
      }
  
      // Load an individual page, first checking if you've already loaded it
      UIView *pageView = [self.pageViews objectAtIndex:page];
      if ((NSNull*)pageView == [NSNull null]) {
          CGRect frame = gridView.bounds;
          frame.origin.x = frame.size.width * page;
          frame.origin.y = 0.0f;
          frame = CGRectInset(frame, 10.0f, 0.0f);
          UIImageView *newPageView = [[UIImageView alloc] initWithImage:image];
          newPageView.frame = frame;
          [gridView addSubview:newPageView];
          labelDescription.text = descriptionArray[page];
          [self.pageViews replaceObjectAtIndex:page withObject:newPageView];
      }
  }
  
  - (void)purgePage:(NSInteger)page {
      if (page &lt; 0 || page &gt;= self.pageImages.count) {
          // If it's outside the range of what you have to display, then do nothing
          return;
      }
  
  // Remove a page from the scroll view and reset the container array
  UIView *pageView = [self.pageViews objectAtIndex:page];
  if ((NSNull*)pageView != [NSNull null]) {
      [pageView removeFromSuperview];
      [self.pageViews replaceObjectAtIndex:page withObject:[NSNull null]];
      labelDescription.text = @"";
  }
  }
  
  - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
      // Load the pages that are now on screen
      [self loadVisiblePages];
  }
  </code></pre>
  
  <p>I should mention that I am able to slide different images but cannot update their text. As it stands, I can only get the text corresponding to the first image but nothing else. 
  THANKS</p>