 			
 			// Scrolls the other table so that the matching cell is visible
 			syncScrolling = syncScrollSide
-			syncTarget.scrollToRow(at: targetIndex, at: .none, animated: true)
+			syncTarget.scrollToRow(at: targetIndex, at: .middle, animated: true)
 		}
 	}
 	
 	func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)
 	{
-		updateOffSets()
+		//updateOffSets()
 		
 		print("STATUS: SCROLLING ENDED")
 		syncScrolling = nil

	
	func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool)
	{
		updateOffSets()
	}
	
	

		}
	}
	
	/*
	private func updateOffSets()
	{
		lastOffsetY[.left] = leftTableView.contentOffset.y
		lastOffsetY[.right] = rightTableView.contentOffset.y
	}*/
	
	private func centerCell(ofTable tableView: UITableView) -> UITableViewCell?
	{
		// Finds the visible cells
		let visibleCells = tableView.visibleCells
		
		// Finds the index path of each cell
		let indexPaths = tableView.indexPathsForVisibleRows.or([])
		
		guard !visibleCells.isEmpty && indexPaths.count >= visibleCells.count else
		{
			return nil
		}
		
		// Finds the height of each cell
		let cellHeights = indexPaths.map { tableView.rectForRow(at: $0).height }
		
		// Calculates the height of the visible area
		let totalHeight = cellHeights.reduce(0, { result, h in return result + h })
		let centerY = totalHeight / 2
		
		// Finds the centermost cell
		var y:CGFloat = 0
		for i in 0 ..< cellHeights.count
		{
			let nextY = y + cellHeights[i]
			
			if nextY > centerY
			{
				return visibleCells[i]
			}
			
			y = nextY
		}
		
		return nil
	}
}
