Skip to content

Commit

Permalink
Merge pull request #123 from NYTimes/feature/close-button-fix
Browse files Browse the repository at this point in the history
Use bundleForClass on a NYTPhotoViewer class to retrieve the appropriate bundle
  • Loading branch information
Twigz committed Jan 13, 2016
2 parents 1b02956 + 0c39d43 commit fe13f40
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 fe13f40

Please sign in to comment.