     
     public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
         if let firstSelectedAsset = self.imagePickerController.selectedAssets.first,
-            let selectedAsset = (collectionView.cellForItem(at: indexPath) as? DKAssetGroupDetailBaseCell)?.asset, self.imagePickerController.allowMultipleTypes == false && firstSelectedAsset.type != selectedAsset.type {
+            let selectedAsset = (collectionView.cellForItem(at: indexPath) as? DKAssetGroupDetailBaseCell)?.asset
+            , self.imagePickerController.allowMultipleTypes == false && firstSelectedAsset.type != selectedAsset.type {
 
             let alert = UIAlertController(
                     title: DKImageLocalizedStringWithKey("selectPhotosOrVideos")

		self.collectionView!.reloadData()
    }
    
    //use the swiping gesture to select the currently swiping cell.
    @objc private func swiping(gesture: UIPanGestureRecognizer) {
        if gesture.state != .ended {
            let loc = gesture.location(ofTouch: 0, in: self.collectionView)
            if let path = self.collectionView.indexPathForItem(at: loc), let cell = self.collectionView.cellForItem(at: path), let cc = cell as? DKAssetGroupDetailBaseCell {
                if let ast = cc.asset {
                    if curSwipingPath != path {
                        curSwipingPath = path
                        if !self.imagePickerController.selectedAssets.contains(ast) {
                            self.imagePickerController.selectImage(atIndexPath: path)
                        } else {
                            self.imagePickerController.deselectAsset(ast)
                        }
                    }
                }
            }
        }
    }
    
	open func updateTitleView() {
		let group = self.imagePickerController.groupDataManager.fetchGroupWithGroupId(self.selectedGroupId!)
		self.title = group.groupName

                self.imagePickerController.presentCamera()
            }
        } else {
            self.selectAsset(atIndex: indexPath)
        }
    }
    
    public func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
        self.deselectAsset(atIndex: indexPath)
    }
    
    public func scrollViewDidScroll(_ scrollView: UIScrollView) {
