diff --git a/PYSearch/NSBundle+PYSearchExtension.m b/PYSearch/NSBundle+PYSearchExtension.m index fc1c216..7c84c05 100644 --- a/PYSearch/NSBundle+PYSearchExtension.m +++ b/PYSearch/NSBundle+PYSearchExtension.m @@ -6,6 +6,7 @@ // #import "NSBundle+PYSearchExtension.h" +#import "PYSearchViewController.h" @implementation NSBundle (PYSearchExtension) @@ -18,7 +19,7 @@ + (NSBundle *)py_searchBundle searchBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"PYSearch" ofType:@"bundle"]]; // 如果使用pod导入,并且在Podfile中配置use_frameworks!则[NSBundle mainBundle] 加载不到PYSearch.framework中的PYSearch.bundle资源文件 if (searchBundle == nil) { // 为空说明资源文件在PYSearch.framework中 - searchBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:self] pathForResource:@"PYSearch" ofType:@"bundle"]]; + searchBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[PYSearchViewController class]] pathForResource:@"PYSearch" ofType:@"bundle"]]; } } return searchBundle; diff --git a/PYSearchExample/PYSearchExample.xcodeproj/project.xcworkspace/xcuserdata/iphone5solo.xcuserdatad/UserInterfaceState.xcuserstate b/PYSearchExample/PYSearchExample.xcodeproj/project.xcworkspace/xcuserdata/iphone5solo.xcuserdatad/UserInterfaceState.xcuserstate index 9098f9b..738ee3c 100644 Binary files a/PYSearchExample/PYSearchExample.xcodeproj/project.xcworkspace/xcuserdata/iphone5solo.xcuserdatad/UserInterfaceState.xcuserstate and b/PYSearchExample/PYSearchExample.xcodeproj/project.xcworkspace/xcuserdata/iphone5solo.xcuserdatad/UserInterfaceState.xcuserstate differ