Skip to content

Commit

Permalink
Fixes the image issue by using bundleForClass:
Browse files Browse the repository at this point in the history
  • Loading branch information
bcapps committed Jan 7, 2016
1 parent 35a6c79 commit 47b6240
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Pod/Classes/ios/Resource Loading/NSBundle+NYTPhotoViewer.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
//

#import "NSBundle+NYTPhotoViewer.h"
#import "NYTPhotosViewController.h"

@implementation NSBundle (NYTPhotoViewer)

+ (instancetype)nyt_photoViewerResourceBundle {
static NSBundle *resourceBundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *resourceBundlePath = [[NSBundle mainBundle] pathForResource:@"NYTPhotoViewer" ofType:@"bundle"];
NSString *resourceBundlePath = [[NSBundle bundleForClass:[NYTPhotosViewController class]] pathForResource:@"NYTPhotoViewer" ofType:@"bundle"];
resourceBundle = [self bundleWithPath:resourceBundlePath];
});
return resourceBundle;
Expand Down

0 comments on commit 47b6240

Please sign in to comment.