[go: nahoru, domu]

Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NJHu committed May 13, 2018
1 parent ee0ea25 commit b6ab051
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions iOSProject/iOSProject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2789,7 +2789,7 @@
CODE_SIGN_ENTITLEMENTS = iOSProject/iOSProject.entitlements;
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = EH8D228RS6;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = iOSProject/LMJiOSProject.pch;
INFOPLIST_FILE = iOSProject/Info.plist;
Expand Down Expand Up @@ -2920,7 +2920,7 @@
CODE_SIGN_ENTITLEMENTS = iOSProject/iOSProject.entitlements;
CODE_SIGN_STYLE = Automatic;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = EH8D228RS6;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = iOSProject/LMJiOSProject.pch;
INFOPLIST_FILE = iOSProject/Info.plist;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableAddressSanitizer = "YES"
language = "zh-Hans"
region = "CN"
launchStyle = "0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ - (void)viewDidLoad {
self.webView.UIDelegate = self;

if ([self.parentViewController isKindOfClass:[UINavigationController class]]) {
UIEdgeInsets contentInset = self.webView.scrollView.contentInset;
contentInset.top += self.lmj_navgationBar.lmj_height;
self.webView.scrollView.contentInset = contentInset;
if (@available(iOS 11.0, *)){
self.webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
UIEdgeInsets contentInset = self.webView.scrollView.contentInset;
contentInset.top += self.lmj_navgationBar.lmj_height;
self.webView.scrollView.contentInset = contentInset;
self.webView.scrollView.scrollIndicatorInsets = self.webView.scrollView.contentInset;
}

Expand Down Expand Up @@ -83,6 +83,10 @@ - (void)viewDidLoad {
}else if (!LMJIsEmpty(self.contentHTML)) {
[self.webView loadHTMLString:self.contentHTML baseURL:nil];
}

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.webView reload];
});
}


Expand Down
4 changes: 4 additions & 0 deletions iOSProject/iOSProject/Classes/Main/LMJHomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ - (UIImage *)lmjNavigationBarRightButtonImage:(UIButton *)rightButton navigation
/** 左边的按钮的点击 */
-(void)leftButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar
{
LMJWebViewController *ac = [LMJWebViewController new];
ac.gotoURL = @"https://baidu.com";

[self.navigationController pushViewController:ac animated:YES];
NSLog(@"%s", __func__);
}
/** 右边的按钮的点击 */
-(void)rightButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar
Expand Down

0 comments on commit b6ab051

Please sign in to comment.