Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NJKWebViewProgressView as Progress Bar on UIView #45

Open
loretoparisi opened this issue Jul 16, 2015 · 0 comments
Open

NJKWebViewProgressView as Progress Bar on UIView #45

loretoparisi opened this issue Jul 16, 2015 · 0 comments

Comments

@loretoparisi
Copy link

Hi,
I'm trying to use the NJKWebViewProgressView as progress on a UIView like:

- (void)viewDidLoad {
CGFloat progressBarHeight = 2.f;
    CGRect navigaitonBarBounds = self.view.bounds;
    CGRect barFrame = CGRectMake(0, progressBarHeight + 5.0 , navigaitonBarBounds.size.width, progressBarHeight);
    _progressView = [[NJKWebViewProgressView alloc] initWithFrame:barFrame];
    _progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
    [_progressView setProgress:0.2 animated:NO];
    [self.container addSubview:_progressView];
    //...

so without having any UIWebView delegate and trying to update the progress manually. If I try to change the progress it seems nothing happens a part in the viewDidLoad method:

-(IBAction)discover:(id)sender {

    float progress=0.5;
    dispatch_async(dispatch_get_main_queue(), ^{
        [_progressView setProgress:progress animated:YES];
    });

where self.container is a UIView.
Where I'm wrong or missing something in the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant