title: How to load images from documents directory into image view in Objective-C
body: <pre><code>NSString *path = [NSString stringWithFormat:@"%@/%@",[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0], parentFolderName] ;
  NSArray *dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
  NSEnumerator *enumerator = [dirContents objectEnumerator] ;
  id fileName ;
  NSMutableArray *fileArray = [[NSMutableArray alloc] init] ;
  while (fileName = [enumerator nextObject])
  {
      NSString *fullFilePath = [path stringByAppendingPathComponent:fileName];
      NSRange textRangeJpg = [[fileName lowercaseString] rangeOfString:[@".png" lowercaseString]];
  
      if (textRangeJpg.location != NSNotFound)
      {
          originalImage = [UIImage imageWithContentsOfFile:fullFilePath];
          [fileArray addObject:originalImage];
      }
  }
  </code></pre>