NSBundle + Framework
// | |
// NSBundle+MyLibrary.h | |
// Pods | |
// | |
// Created by Yiming Tang on 8/4/15. | |
// Copyright (c) 2015 Yiming Tang. All rights reserved. | |
// | |
@import Foundation; | |
@interface NSBundle (MyLibrary) | |
+ (NSBundle *)my_myLibraryBundle; | |
+ (NSURL *)my_myLibraryBundleURL; | |
@end |
// | |
// NSBundle+MyLibrary.m | |
// Pods | |
// | |
// Created by Yiming Tang on 8/4/15. | |
// Copyright (c) 2015 Yiming Tang. All rights reserved. | |
// | |
#import "NSBundle+MyLibrary.h" | |
#import "MYSomeClass.h" | |
@implementation NSBundle (MyLibrary) | |
+ (NSBundle *)my_myLibraryBundle { | |
return [self bundleWithURL:[self my_myLibraryBundleURL]]; | |
} | |
+ (NSURL *)my_myLibraryBundleURL { | |
NSBundle *bundle = [NSBundle bundleForClass:[MYSomeClass class]]; | |
return [bundle URLForResource:@"MyLibrary" withExtension:@"bundle"]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment