Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DemoApp.xcodeproj/project.xcworkspace/xcuserdata
DemoApp.xcodeproj/xcuserdata
1 change: 1 addition & 0 deletions DemoApp/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}

Expand Down
2 changes: 1 addition & 1 deletion NJKWebViewProgress.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
1 change: 1 addition & 0 deletions NJKWebViewProgress/NJKWebViewProgressView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down