From 732250a07eea2b1086d9f39f4580885f317bc1d6 Mon Sep 17 00:00:00 2001 From: Alexey Afanasyev Date: Thu, 25 Dec 2014 20:19:03 +0300 Subject: [PATCH 1/4] There is no sense in progress property until it is set by setProgress because it is never changed. --- DemoApp/ViewController.m | 1 + NJKWebViewProgress/NJKWebViewProgressView.m | 1 + 2 files changed, 2 insertions(+) diff --git a/DemoApp/ViewController.m b/DemoApp/ViewController.m index 2231b62..967db78 100644 --- a/DemoApp/ViewController.m +++ b/DemoApp/ViewController.m @@ -68,6 +68,7 @@ -(void)loadGoogle -(void)webViewProgress:(NJKWebViewProgress *)webViewProgress updateProgress:(float)progress { [_progressView setProgress:progress animated:YES]; + NSAssert(progress == _progressView.progress, @"Progress is not set correctly"); self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"]; } diff --git a/NJKWebViewProgress/NJKWebViewProgressView.m b/NJKWebViewProgress/NJKWebViewProgressView.m index bf9fe67..3cfba0a 100644 --- a/NJKWebViewProgress/NJKWebViewProgressView.m +++ b/NJKWebViewProgress/NJKWebViewProgressView.m @@ -49,6 +49,7 @@ -(void)setProgress:(float)progress - (void)setProgress:(float)progress animated:(BOOL)animated { + _progress = progress; BOOL isGrowing = progress > 0.0; [UIView animateWithDuration:(isGrowing && animated) ? _barAnimationDuration : 0.0 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ CGRect frame = _progressBarView.frame; From 33b1a19e88a2b7340883c12101e173cdf2814bf2 Mon Sep 17 00:00:00 2001 From: Alexey Afanasyev Date: Thu, 19 Feb 2015 20:27:14 +0300 Subject: [PATCH 2/4] 1) podspec 2) .gitignore --- .gitignore | 2 ++ NJKWebViewProgress.podspec | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..324bda6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +DemoApp.xcodeproj/project.xcworkspace/xcuserdata +DemoApp.xcodeproj/xcuserdata diff --git a/NJKWebViewProgress.podspec b/NJKWebViewProgress.podspec index 64ae9bb..0d82cf5 100644 --- a/NJKWebViewProgress.podspec +++ b/NJKWebViewProgress.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = "NJKWebViewProgress" - s.version = "0.2.3" + s.version = "0.2.3+" s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = "UIWebView progress interface." s.homepage = "https://github.com/ninjinkun/NJKWebViewProgress" s.authors = { "ninjinkun" => "ninjin@mac.com" } - s.source = { :git => "https://github.com/ninjinkun/NJKWebViewProgress.git", :tag => "v#{s.version}" } + s.source = { :git => "https://github.com/AlexeyAfanasyev/NJKWebViewProgress.git"}" } s.platform = :ios, '4.3' s.requires_arc = true s.subspec 'Core' do |ss| From 875c2f5e2f1ee1b94ff27c2f640e75639722b0c1 Mon Sep 17 00:00:00 2001 From: Alexey Afanasyev Date: Thu, 19 Feb 2015 21:25:40 +0300 Subject: [PATCH 3/4] Update NJKWebViewProgress.podspec --- NJKWebViewProgress.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NJKWebViewProgress.podspec b/NJKWebViewProgress.podspec index 0d82cf5..4323e6c 100644 --- a/NJKWebViewProgress.podspec +++ b/NJKWebViewProgress.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.summary = "UIWebView progress interface." s.homepage = "https://github.com/ninjinkun/NJKWebViewProgress" s.authors = { "ninjinkun" => "ninjin@mac.com" } - s.source = { :git => "https://github.com/AlexeyAfanasyev/NJKWebViewProgress.git"}" } + s.source = { :git => "https://github.com/AlexeyAfanasyev/NJKWebViewProgress.git" } s.platform = :ios, '4.3' s.requires_arc = true s.subspec 'Core' do |ss| From dec0ae3d21721d074030b2e7c07983738ac1f373 Mon Sep 17 00:00:00 2001 From: Alexey Afanasyev Date: Thu, 19 Feb 2015 21:26:56 +0300 Subject: [PATCH 4/4] Update NJKWebViewProgress.podspec --- NJKWebViewProgress.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NJKWebViewProgress.podspec b/NJKWebViewProgress.podspec index 4323e6c..1d2cc54 100644 --- a/NJKWebViewProgress.podspec +++ b/NJKWebViewProgress.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "NJKWebViewProgress" - s.version = "0.2.3+" + s.version = "0.2.3" s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = "UIWebView progress interface." s.homepage = "https://github.com/ninjinkun/NJKWebViewProgress"