From 555a19bcc97e911fb2636b1da8b062f15dae2f92 Mon Sep 17 00:00:00 2001 From: haranicle Date: Wed, 4 Oct 2017 22:12:02 +0900 Subject: [PATCH] fix demo code --- Demo/DemoListViewController.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Demo/DemoListViewController.swift b/Demo/DemoListViewController.swift index 353bd5c..67e67d4 100644 --- a/Demo/DemoListViewController.swift +++ b/Demo/DemoListViewController.swift @@ -73,14 +73,15 @@ class DemoListViewController: UITableViewController, NohanaImagePickerController switch PHPhotoLibrary.authorizationStatus() { case .notDetermined: PHPhotoLibrary.requestAuthorization { status in - switch status { - case .authorized: - handler(true) - default: - handler(false) + DispatchQueue.main.async { + switch status { + case .authorized: + handler(true) + default: + handler(false) + } } } - case .restricted: handler(false) case .denied: