Skip to content

Commit

Permalink
修复无法正确读取webView 标题显示在navigation上
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenMaolei authored and ChenMaolei committed Feb 28, 2017
1 parent 194b318 commit ea93af4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions XMNWeb/Classes/Bridge/XMNWebViewJSBridge.h
Expand Up @@ -64,8 +64,7 @@ NS_ASSUME_NONNULL_BEGIN

@end

inline static NSBundle * XMNWebJSBridgeBundle()
{
inline static NSBundle * XMNWebJSBridgeBundle() {
return [NSBundle bundleWithPath:[NSString stringWithFormat:@"%@/%@", [NSBundle bundleForClass:[XMNWebViewJSBridge class]].bundlePath, @"XMNWebBridge.bundle"]];
}

Expand Down
2 changes: 1 addition & 1 deletion XMNWeb/Classes/Core/XMNWebController.m
Expand Up @@ -365,7 +365,7 @@ - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {

if (!self.navigationItem.title) {
if (!self.navigationItem.title || !self.navigationItem.title.length) {
self.navigationItem.title = webView.title;
}
}
Expand Down

0 comments on commit ea93af4

Please sign in to comment.