Commit 74a2f835 authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCEmbeddedDialogProvider: fix runtime exception on iOS 8

parent d981ce9e
......@@ -186,7 +186,9 @@ static void updateProgressCallback(void *p_data,
style:UIAlertActionStyleDestructive
handler:nil];
[alertController addAction:action];
[alertController setPreferredAction:action];
if ([alertController respondsToSelector:@selector(setPreferredAction:)]) {
[alertController setPreferredAction:action];
}
[[[[UIApplication sharedApplication].delegate.window rootViewController] presentedViewController] presentViewController:alertController
animated:YES
completion:nil];
......@@ -224,7 +226,9 @@ static void updateProgressCallback(void *p_data,
NO);
}];
[alertController addAction:loginAction];
[alertController setPreferredAction:loginAction];
if ([alertController respondsToSelector:@selector(setPreferredAction:)]) {
[alertController setPreferredAction:loginAction];
}
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
style:UIAlertActionStyleCancel
......@@ -271,7 +275,9 @@ static void updateProgressCallback(void *p_data,
libvlc_dialog_post_action([dialogData[0] pointerValue], 1);
}];
[alertController addAction:yesAction];
[alertController setPreferredAction:yesAction];
if ([alertController respondsToSelector:@selector(setPreferredAction:)]) {
[alertController setPreferredAction:yesAction];
}
}
if (![dialogData[6] isEqualToString:@""]) {
......
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