Skip to content
Snippets Groups Projects
Commit 164be46b authored by Maxime Graulich's avatar Maxime Graulich
Browse files

iOS: GUI refresh in main thread

parent 9136621b
No related branches found
No related tags found
No related merge requests found
......@@ -182,17 +182,21 @@
dispatch_group_notify(group, queue, ^{
[UIApplication sharedApplication].applicationIconBadgeNumber = -1;
[_runStopButton setAction:@selector(compute)];
[_runStopButton setTitle:@"Run"];
[_progressLabel setHidden:YES];
[_progressIndicator stopAnimating];
[_progressIndicator setHidden:YES];
if(_errors.count > 0) {
_errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:@"Show more", nil];
[_errorAlert show];
}
[self performSelectorOnMainThread:@selector(stopGUI) withObject:nil waitUntilDone:YES];
});
}
-(void)stopGUI
{
[_runStopButton setAction:@selector(compute)];
[_runStopButton setTitle:@"Run"];
[_progressLabel setHidden:YES];
[_progressIndicator stopAnimating];
[_progressIndicator setHidden:YES];
if(_errors.count > 0) {
_errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:@"Show more", nil];
[_errorAlert show];
}
}
- (void)stop
{
onelab_cb("stop");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment