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

Stop activity indicator after receiving data from API #220

Open
ZoebHusainSheikh opened this issue Sep 9, 2014 · 4 comments
Open

Stop activity indicator after receiving data from API #220

ZoebHusainSheikh opened this issue Sep 9, 2014 · 4 comments

Comments

@ZoebHusainSheikh
Copy link

Hey, currently I found this code to stop activity indicator in demo project.

[weakSelf.tableView.infiniteScrollingView stopAnimating]; (inside "insertRowAtBottom" method)

But it calls after 2 sec. I want to stop animation once I get the response from API.

so I wrote this stopAnimating line after API response. Is there any better way to achieve this?

@skmohanraj
Copy link

Hi @zsheikh-systango do u got solution? i am to want it...will u help me?

@ZoebHusainSheikh
Copy link
Author

Yes, instead of calling [self.tableView.infiniteScrollingView stopAnimating]; inside |insertRowAtBottom| method

you have to call just after API response.
also make sure if you are not making call because of any validation then call [self.tableView.infiniteScrollingView stopAnimating]; else it won't stop animating and you will face other issues

@skmohanraj
Copy link

Thanks for quick reply,
I have write inside the insertRowAtBottom , it can only once success,
When i second time scroll in the bottom, issue again happened and Activity indicator shows infinitely.

@skmohanraj
Copy link

I was Resolve my issue by Replace

[self.tableView.infiniteScrollingView stopAnimating];

By
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

        [self.tableView..infiniteScrollingView stopAnimating];

    });

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

2 participants