             }
         }
     }
-	
-	// Delegate methods...
-	
-	open func prepareLayout(_ imagePickerController: DKImagePickerController, vc: UIViewController) {
-		vc.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: self.createDoneButtonIfNeeded())
-	}
-        	
-	open func layoutForImagePickerController(_ imagePickerController: DKImagePickerController) -> UICollectionViewLayout.Type {
-		return DKAssetGroupGridLayout.self
-	}
-	
-	open func imagePickerController(_ imagePickerController: DKImagePickerController,
-	                                  showsCancelButtonForVC vc: UIViewController) {
-		vc.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel,
-		                                                      target: imagePickerController,
-		                                                      action: #selector(imagePickerController.dismiss as () -> Void))
-	}
-	
-	open func imagePickerController(_ imagePickerController: DKImagePickerController,
-	                                  hidesCancelButtonForVC vc: UIViewController) {
-		vc.navigationItem.leftBarButtonItem = nil
-	}
+    
+    // Delegate methods...
+    
+    open func prepareLayout(_ imagePickerController: DKImagePickerController, vc: UIViewController) {
+        vc.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: self.createDoneButtonIfNeeded())
+    }
+    
+    open func layoutForImagePickerController(_ imagePickerController: DKImagePickerController) -> UICollectionViewLayout.Type {
+        return DKAssetGroupGridLayout.self
+    }
+    
+    open func imagePickerController(_ imagePickerController: DKImagePickerController,
+                                    showsCancelButtonForVC vc: UIViewController) {
+        vc.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel,
+                                                              target: imagePickerController,
+                                                              action: #selector(imagePickerController.dismiss as () -> Void))
+    }
+    
+    open func imagePickerController(_ imagePickerController: DKImagePickerController,
+                                    hidesCancelButtonForVC vc: UIViewController) {
+        vc.navigationItem.leftBarButtonItem = nil
+    }
     
     open func imagePickerController(_ imagePickerController: DKImagePickerController, didSelectAssets: [DKAsset]) {
         self.updateDoneButtonTitle(self.createDoneButtonIfNeeded())
     }
-	    
+    
     open func imagePickerController(_ imagePickerController: DKImagePickerController, didDeselectAssets: [DKAsset]) {
         self.updateDoneButtonTitle(self.createDoneButtonIfNeeded())
     }

            self.doneButton = button
            self.updateDoneButtonTitle(button)
        }
		
		return self.doneButton!
	}
    
    open func updateDoneButtonTitle(_ button: UIButton) {
        if self.imagePickerController.selectedAssetIdentifiers.count > 0 {


@objc
open class DKImagePickerControllerBaseUIDelegate: NSObject, DKImagePickerControllerUIDelegate {
    
    open weak var imagePickerController: DKImagePickerController!
    
    open var doneButton: UIButton?
    
    open func createDoneButtonIfNeeded() -> UIButton {
        if self.doneButton == nil {
            let button = UIButton(type: UIButtonType.custom)
            button.setTitleColor(UINavigationBar.appearance().tintColor ?? self.imagePickerController.navigationBar.tintColor, for: .normal)
