title: NSBundle path for resource return nil in iOS
body: <p>I've a <code>bgs.bundle</code> which contains 20 images, I'm trying to load image_file.</p>
  
  <pre><code>NSString *bpath = [[NSBundle mainBundle] pathForResource:@"bgs" ofType:@"bundle"];
  NSArray *files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bpath error:NULL];
  for (NSString *fileName in files) {
      NSString *filePath = [[NSBundle mainBundle] pathForResource:fileName ofType:@"nil"];
          if (filePath){
                  NSLog(filePath);
          }else{
              NSLog(@"file path is null");
          }
  </code></pre>
  
  <p><code>filePath</code> is always null, I've also printed <code>fileName</code> which is working fine.
  What can be the problem with my code or there is some other way to load files from bundle? </p>