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/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.podspec b/NJKWebViewProgress.podspec index 64ae9bb..1d2cc54 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/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| 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;