presentModalViewControllerAnimated: gives white screen-Collection of common programming errors

Hey all. Something which has been bugging me quite a bit recently is this custom movie player I’ve put together. It’s largely based on a working one, NGMoviePlayer.

The issue is this: I have the .xib in a UIKit-friendly resource bundle. When I call:

[MyMoviePlayerViewController initWithNibName:@"MyMoviePlayerViewController"
 bundle:[NSBundle bundleWithPath:
         [[NSBundle mainBundle] bundlePath]
          stringByAppendingPathComponent:@"MyMoviePlayerViewController.bundle"]];

..on my custom class, and then access the view (thus calling loadView) it doesn’t throw any errors, but nor does it actually load the outlets properly. I am presented with a white screen, and debugging shows that all visual elements are 0x0, but there was no error as would be expected.

EDIT: I’ve also now tried just loading the .xib outside of a resource bundle in my target app, and the same thing happens (white screen).

The particular ones I was looking for was either:

  • Could not load NIB ... if it wasn’t found at all, or
  • ...loaded the NIB but the view outlet was not set if it was found but not connected properly

The xib is in the local app (I understand that static libs can’t contain xibs). I’ve tried using this same resource bundle with the NGMoviePlayerDemo project provided by the author of NGMoviePlayer, and it does throw an error:

Could not load NIB in bundle:
'/Users/.../MyMoviePlayerViewController.bundle (not yet loaded)'
 with name 'MyMoviePlayerViewController'

I have navigated to the path it displays for the bundle and there exists a MyMoviePlayerViewController.xib file at that location.

I’ve also tried using bundle:nil in case Xcode combined the resources of bundle directories with the main one for some reason. Both cases throw no error and display a white screen in my actual project. Both cases throw a Could not load NIB error in the NGMoviePlayerDemo project.

EDIT: I have tried the same .xib separate from a resource bundle in the NGMoviePlayerDemo app and it works fine.

All input is greatly appreciated.