-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
Load bar button item images from the correct bundle
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSBundle+NYTPhotoViewer.h | ||
// NYTPhotoViewer | ||
// | ||
// Created by Chris Dzombak on 10/16/15. | ||
// | ||
// | ||
|
||
@import Foundation; | ||
|
||
@interface NSBundle (NYTPhotoViewer) | ||
|
||
+ (instancetype)nyt_photoViewerResourceBundle; | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// NSBundle+NYTPhotoViewer.m | ||
// NYTPhotoViewer | ||
// | ||
// Created by Chris Dzombak on 10/16/15. | ||
// | ||
// | ||
|
||
#import "NSBundle+NYTPhotoViewer.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"]; | ||
resourceBundle = [self bundleWithPath:resourceBundlePath]; | ||
}); | ||
return resourceBundle; | ||
} | ||
|
||
@end |