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

Updated some iOS objective-c methods

parent 3d3b0c42
......@@ -60,7 +60,7 @@
self.visible = true;
self.viewController = viewController;
NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *urlPath = [NSURL URLWithString:[path stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]];
self.documentInteractionController.URL = urlPath;
[self.documentInteractionController presentPreviewAnimated:YES];
......@@ -29,13 +29,12 @@
- (void) showCantSendMailAlert
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: 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")
delegate: self
cancelButtonTitle: NSLocalizedString(@"OK", @"OK")
otherButtonTitles: nil ];
[alert show];
[alert release];
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")
UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {}];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
- (NSString *)guessMIMETypeFromFileName:(NSString *)fileName
......@@ -72,7 +71,7 @@
[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];
......@@ -103,7 +102,7 @@
[self dismissViewControllerAnimated:YES completion:NULL];
[self dismissViewControllerAnimated:YES completion:nil];
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