Commit 896cd277 authored by Martin Straka's avatar Martin Straka

Updated some iOS objective-c methods

parent 3d3b0c42
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
self.visible = true; self.visible = true;
self.viewController = viewController; self.viewController = viewController;
NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]];
self.documentInteractionController.URL = urlPath; self.documentInteractionController.URL = urlPath;
[self.documentInteractionController presentPreviewAnimated:YES]; [self.documentInteractionController presentPreviewAnimated:YES];
} }
......
...@@ -29,13 +29,12 @@ ...@@ -29,13 +29,12 @@
- (void) showCantSendMailAlert - (void) showCantSendMailAlert
{ {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString(@"Can't send email", @"Can't send email") UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Can't send email", @"Can't send email")
message: NSLocalizedString(@"The device is not configured for sending email", @"The device is not configured for sending email") message:NSLocalizedString(@"The device is not configured for sending email", @"The device is not configured for sending email")
delegate: self preferredStyle:UIAlertControllerStyleAlert];
cancelButtonTitle: NSLocalizedString(@"OK", @"OK") UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
otherButtonTitles: nil ]; [alert addAction:defaultAction];
[alert show]; [self presentViewController:alert animated:YES completion:nil];
[alert release];
} }
- (NSString *)guessMIMETypeFromFileName:(NSString *)fileName - (NSString *)guessMIMETypeFromFileName:(NSString *)fileName
...@@ -72,7 +71,7 @@ ...@@ -72,7 +71,7 @@
[controller addAttachmentData:filedata mimeType:mimetype fileName:filename]; [controller addAttachmentData:filedata mimeType:mimetype fileName:filename];
} }
if (controller) [self presentViewController:controller animated:YES completion:NULL]; if (controller) [self presentViewController:controller animated:YES completion:nil];
[controller release]; [controller release];
} }
...@@ -103,7 +102,7 @@ ...@@ -103,7 +102,7 @@
break; break;
} }
[self dismissViewControllerAnimated:YES completion:NULL]; [self dismissViewControllerAnimated:YES completion:nil];
} }
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment