From 5fb1dcaaad1f3e3772a0d0a5a198a86ac13fc440 Mon Sep 17 00:00:00 2001 From: Rawlings Date: Thu, 26 May 2016 21:37:37 +0800 Subject: [PATCH] change _progressBarView initial width to zero --- NJKWebViewProgress/NJKWebViewProgressView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NJKWebViewProgress/NJKWebViewProgressView.m b/NJKWebViewProgress/NJKWebViewProgressView.m index bf9fe67..b22630e 100644 --- a/NJKWebViewProgress/NJKWebViewProgressView.m +++ b/NJKWebViewProgress/NJKWebViewProgressView.m @@ -28,7 +28,9 @@ -(void)configureViews { self.userInteractionEnabled = NO; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _progressBarView = [[UIView alloc] initWithFrame:self.bounds]; + CGRect rect = self.bounds; + rect.size.width = 0; + _progressBarView = [[UIView alloc] initWithFrame:rect]; _progressBarView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; UIColor *tintColor = [UIColor colorWithRed:22.f / 255.f green:126.f / 255.f blue:251.f / 255.f alpha:1.0]; // iOS7 Safari bar color if ([UIApplication.sharedApplication.delegate.window respondsToSelector:@selector(setTintColor:)] && UIApplication.sharedApplication.delegate.window.tintColor) {