     override func viewWillAppear(_ animated: Bool) {
  
         if let path = getIndexPath(){
-                  view.layoutIfNeeded()
+            
               collectionView?.scrollToItem(at: path, at: .centeredVertically, animated: false)
+            //collectionView?.selectItem(at: path, animated: false, scrollPosition: .centeredVertically)
+             collectionView?.layoutIfNeeded()
         }
   
 

        //collectionView?.reloadData()
        
        setNeedsFocusUpdate()
         updateFocusIfNeeded()
        
        // reset the lastIndexPosition
        // because we have already set and read out the position
        // and are ready for new details or viewcontroller changes
        
        // lastIndexPosition = nil
    }

                if(dateAssets.assetArray.count > lastIndex){
                    
                    
                    //print("coordinates row:\(lastIndex) section:\(sectionPosition)")
                    return IndexPath(row: lastIndex, section: sectionPosition)
                    
                }
