                 self.UIDelegate.prepareLayout(self, vc: rootVC)
                 self.updateCancelButtonForVC(rootVC)
                 self.setViewControllers([rootVC], animated: false)
-                if let count = self.defaultSelectedAssets?.count, count > 0 {
-                    self.UIDelegate.imagePickerController(self, didSelectAssets: [self.defaultSelectedAssets!.last!])
-                }
             }
         }
     }

    
    @objc public var exporter: DKImageAssetExporter? = DKImageAssetExporter.sharedInstance
    
    /// It will have selected the specific assets.
    @objc public var defaultSelectedAssets: [DKAsset]? {
        didSet {
            if let defaultSelectedAssets = self.defaultSelectedAssets {
                if Set(self.selectedAssets) != Set(defaultSelectedAssets) {
                    self.selectedAssets = self.defaultSelectedAssets ?? []
                    
                    if let rootVC = self.viewControllers.first as? DKAssetGroupDetailVC {
                        rootVC.collectionView.reloadData()
                    }
                }
            }
        }
    }
    
    @objc open private(set) var selectedAssets = [DKAsset]()
    
    internal lazy var groupDataManager: DKImageGroupDataManager = {
        let configuration = DKImageGroupDataManagerConfiguration()
        configuration.assetFetchOptions = self.createAssetFetchOptions()
        
        return DKImageGroupDataManager(configuration: configuration)
    }()
    
    public convenience init() {
        let rootVC = UIViewController()
        
        self.init(rootViewController: rootVC)
    }
    
    public convenience init(groupDataManager: DKImageGroupDataManager) {
        let rootVC = UIViewController()
        self.init(rootViewController: rootVC)
        

    }
    
    @objc open func presentCamera() {
        self.present(self.createCamera(), animated: true, completion: nil)
    }
    
    @objc open override func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Swift.Void)? = nil) {
        if self.inline {
            UIApplication.shared.keyWindow!.rootViewController!.present(viewControllerToPresent,
                                                                        animated: flag,
                                                                        completion: completion)
        } else {
            super.present(viewControllerToPresent, animated: flag, completion: completion)
        }
    }
    
    @objc open override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
        if self.inline {
            UIApplication.shared.keyWindow!.rootViewController!.dismiss(animated: true, completion: nil)
        } else {
            super.dismiss(animated: true, completion: nil)
        }
    }
    
    @objc open func dismissCamera() {
        if let _ = self.camera {
            self.dismiss(animated: true)
            self.camera = nil
        }
    }
