Skip to content

Commit

Permalink
Updated bundle access of the resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
devedbox committed Mar 13, 2017
1 parent e3fb685 commit 3492e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AXWebViewController/AXWebViewController/AXWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ @interface _AXWebViewProgressView : NJKWebViewProgressView
@end

#ifndef kAX404NotFoundHTMLPath
#define kAX404NotFoundHTMLPath [[NSBundle mainBundle] pathForResource:@"AXWebViewController.bundle/html.bundle/404" ofType:@"html"]
#define kAX404NotFoundHTMLPath [[NSBundle bundleForClass:NSClassFromString(@"AXWebViewController")] pathForResource:@"AXWebViewController.bundle/html.bundle/404" ofType:@"html"]
#endif
#ifndef kAXNetworkErrorHTMLPath
#define kAXNetworkErrorHTMLPath [[NSBundle mainBundle] pathForResource:@"AXWebViewController.bundle/html.bundle/neterror" ofType:@"html"]
#define kAXNetworkErrorHTMLPath [[NSBundle bundleForClass:NSClassFromString(@"AXWebViewController")] pathForResource:@"AXWebViewController.bundle/html.bundle/neterror" ofType:@"html"]
#endif

static NSString *const kAX404NotFoundURLKey = @"ax_404_not_found";
Expand Down
6 changes: 5 additions & 1 deletion AXWebViewController/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[[UINavigationBar appearance] setBackIndicatorImage:[UIImage imageNamed:@"back_indicator"]];
[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"back_indicator"]];
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -2) forBarMetrics:UIBarMetricsDefault];
/*
NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"AXWebViewController")];
NSString *bundlePath = [bundle pathForResource:@"AXWebViewController.bundle/html.bundle/404" ofType:@"html"];
*/

return YES;
}
Expand Down Expand Up @@ -81,4 +85,4 @@ - (BOOL)ax_canOpenURL:(NSURL *)url {
- (BOOL)ax_openURL:(NSURL *)url {
return [self ax_openURL:url];
}
@end
@end

0 comments on commit 3492e3e

Please sign in to comment.