-
Notifications
You must be signed in to change notification settings - Fork 63
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
Indicator not dismissing #8
Comments
I think maybe when query done callback, you should call dispatch_get_main_queue(). |
I tried that, still didn't work. Confirmed that showing/dismissing is on main queue. Its something about the initial initialization of the FTIndicator thats having issues |
I tried the following methods, works fine. Just upload some code, try run the demo and click the + button on the up-left. Maybe let me see some of your code to help me understand more about this issue. Thanks.
} |
This is the code snippet where the problem is occurring. It only occurs the first time I see FTIndicator and only when I’m switching to or loading a new view controller. After that everything works fine. I can clear the indicator that won’t go away, by performing an action that shows the indicator again.
When I debug, the breakpoint hits dismissProgress callback before the indicator is actually shown.
private func fetchObjects(){
FTIndicator.showProgressWithmessage("")
query.findObjectsInBackground { (objects: [PFObject]?, error: Error?) in
FTIndicator.dismissProgress()
… On Dec 7, 2016, at 6:51 PM, Liu Fengting ***@***.***> wrote:
I tried the following methods, works fine. Just upload some code, try run the demo and click the + button on the up-left. Maybe let me see some of your code to help me understand more about this issue. Thanks.
`
(void)viewDidLoad {
[super viewDidLoad];
[FTProgressIndicator showProgressWithmessage:@"Something is happening..."];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
for (NSInteger i = 0; i < 1000; i++) {
NSLog(@"print out %ld",i);
}
sleep(3);
dispatch_async(dispatch_get_main_queue(), ^{
[FTProgressIndicator dismiss];
});
});
}
`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#8 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABQm0UQFEcs-Npxy7DBvutlPMZqEp4kWks5rF3DJgaJpZM4LHWO9>.
|
Make sure it is |
I tried dispatch_async but issue still occurs
… On Dec 7, 2016, at 7:09 PM, Liu Fengting ***@***.***> wrote:
Make sure it is dispatch_async. other than that, I can find any other way to solves this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#8 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABQm0VUT-WXr8pngoWqWrT57ZmsAwTfSks5rF3UAgaJpZM4LHWO9>.
|
fix progressView can not didmiss bug,fix issuce #8
Issue happens when:
Note: Only occurs on first time FTIndicator is loaded. Hacked around issue by callign showprogress and then dismissprogress in AppDelegate before any views can be loaded
Happens when loading a new view controller. I believe the indicator hasn't had time to load before calling my dismiss, which causes the issue. Showing and dismissing progress occurs on main thread
The text was updated successfully, but these errors were encountered: