I have a framework which is trying to access xib's and images from a bundle. I am able to access the xib fine but unable to load the images in UIImageView. I even check if the file exists and the console output is yes...
Any idea how to load the image?
Code to load xib in the framework viewcontroller file
self = [super initWithNibName:@"ViewController_iPad" bundle:[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"MyBundle" ofType:@"bundle"]]]; Code to load images
- (void) loadImage { NSString *path = [[NSBundle mainBundle] pathForResource:@"MyBundle.bundle/test" ofType:@"png"]; BOOL present = NO; present = [[NSFileManager defaultManager] fileExistsAtPath:path]; if (present) { NSLog(@"MyBundle.bundle/test exists"); } else { NSLog(@"MyBundle.bundle/test does not exists"); } self.testImageView.image = [UIImage imageNamed:path]; self.testImageView2.image = [UIImage imageWithContentsOfFile:path]; } MyTestHarnessApp[11671:c07] MyBundle.bundle/test exists