From b1548d7dc25e3af2f2241387360f7a4e50bcba6e Mon Sep 17 00:00:00 2001 From: WenchaoD Date: Thu, 9 Mar 2017 18:19:41 +0800 Subject: [PATCH] Present alert controller in example if user denied calendar permission. --- Example-Objc/FullScreenExampleViewController.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Example-Objc/FullScreenExampleViewController.m b/Example-Objc/FullScreenExampleViewController.m index 607b049..b709375 100644 --- a/Example-Objc/FullScreenExampleViewController.m +++ b/Example-Objc/FullScreenExampleViewController.m @@ -258,11 +258,9 @@ NS_ASSUME_NONNULL_END } else { // Alert - UIAlertController *alertController = [[UIAlertController alloc] init]; - alertController.title = @"Error"; - alertController.message = @"Permission of calendar is required for fetching events."; + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Permission Error" message:@"Permission of calendar is required for fetching events." preferredStyle:UIAlertControllerStyleAlert]; [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; - + [self presentViewController:alertController animated:YES completion:nil]; } }];