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

iOS: fix alert on error

parent f8b211de
No related branches found
No related tags found
No related merge requests found
...@@ -318,12 +318,16 @@ ...@@ -318,12 +318,16 @@
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{ {
if(buttonIndex == 0) [_errors removeAllObjects]; if(buttonIndex == 0) {
else [_errors removeLastObject]; [_errors removeAllObjects];
if(_errors.count > 0) { return;
//[_errorAlert setMessage:[_errors lastObject]];
[_errorAlert show];
} }
else [_errors removeLastObject];
if(_errors.count > 1)
_errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:@"Show more", nil];
else
_errorAlert = [[UIErrorAlertView alloc] initWithTitle:@"Gmsh/GetDP error" message:[_errors lastObject] delegate:self cancelButtonTitle:@"Hide" otherButtonTitles: nil];
[_errorAlert show];
} }
#pragma mark - Split view #pragma mark - Split view
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment