title: delaying in loading images in the AQGridView in Objective-C
body: <p>In my app, I have a root view which is a gridview. I am loading an images in the gridview cells.I am having problem with the loading images. As soon as I launch the app, there will be blank cells with out images after a second the images are loading into the cells. Is there any way to solve this issue. The below is my code.</p>
  
  <pre><code>UIImage *defaultImage = [UIImage imageNamed:@"addEmployee.png"];
  if (!employee.imageName) {
      return defaultImage;
  }
  
    if ([_imageCache objectForKey:employee.imageName]) {
        return [_imageCache objectForKey:employee.imageName];
    }
  
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ {
      UIImage *image = [UIImage imageWithContentsOfFile:[self  imagePath:employee.imageName]];
      dispatch_async(dispatch_get_main_queue(), ^ {
          if (image) {
              [_imageCache setObject:image forKey:employee.imageName];
              cell.imageView.image = image;
          } else {
              [_imageCache setObject:defaultImage forKey:employee.imageName];
              cell.imageView.image = defaultImage;
              return;
          }
      });
  });
  
   return cell.imageView.image;
  
  }
  </code></pre>