         present(alert, animated:true, completion:nil)
     }
     
-    func share(step:Int)
+    func share(stepIndex:Int)
     {
         let title:String = String(
             format:NSLocalizedString("CLinearEquationsSolution_shareStepTitle", comment:""),
-            "\((step + 1))")
+            "\((stepIndex + 1))")
         
         let alert:UIAlertController = UIAlertController(
             title:title,

        UIGraphicsEndImageContext()
        let sharingItems:[Any] = [image]
        
        share(items:sharingItems)
        viewSolution.endExporting()
    }
    
    private func shareSolutionImage()
    {
        let allFooters:CGFloat = CGFloat(model.steps.count)
        let allFootersHeight:CGFloat = allFooters * kFooterHeight
        let removeSize:CGFloat = kBarHeight + allFootersHeight
        let collectionView:VCollection = viewSolution.collectionView
        let originalSize:CGSize = collectionView.contentSize
        let exportableHeight:CGFloat = originalSize.height - removeSize
        let exportableSize:CGSize = CGSize(
            width:originalSize.width,
            height:exportableHeight)
        let frame:CGRect = CGRect(origin:CGPoint.zero, size:exportableSize)
        
        UIGraphicsBeginImageContextWithOptions(exportableSize, true, 0)
        
        guard
            
            let context:CGContext = UIGraphicsGetCurrentContext()
            
        else
        {
            return
        }
        
        context.setFillColor(UIColor.white.cgColor)
        context.fill(frame)
        
        var stepIndex:Int = 0
        var removeTop:CGFloat = kBarHeight
        
        for step:MLinearEquationsSolutionStep in model.steps
        {
            var itemIndex:Int = 0
            
            let sectionPath:IndexPath = IndexPath(
                item:0,
                section:stepIndex)
            let header:VLinearEquationsSolutionHeader = collectionView.dequeueReusableSupplementaryView(
                ofKind:UICollectionElementKindSectionHeader,
                withReuseIdentifier:
                VLinearEquationsSolutionHeader.reusableIdentifier,
                for:sectionPath) as! VLinearEquationsSolutionHeader
            header.config(
                step:step)
            let headerFrame:CGRect = header.frame
            let exportableHeaderFrame:CGRect = headerFrame.offsetBy(
                dx:0,
                dy:-removeTop)
            
            header.drawHierarchy(
                in:exportableHeaderFrame,
                afterScreenUpdates:true)
            
            for item:MLinearEquationsSolutionEquationItem in step.plainItems
            {
                let indexPath:IndexPath = IndexPath(
                    item:itemIndex,
                    section:stepIndex)
                let cell:VLinearEquationsSolutionCell = collectionView.dequeueReusableCell(
                    withReuseIdentifier:
                    item.reusableIdentifier,
                    for:indexPath) as! VLinearEquationsSolutionCell
                cell.config(
                    model:item,
                    index:indexPath)
                let cellFrame:CGRect = cell.frame
                let exportableCellFrame:CGRect = cellFrame.offsetBy(
                    dx:0,
                    dy:-removeTop)
                cell.drawHierarchy(
                    in:exportableCellFrame,
                    afterScreenUpdates:true)
                
                itemIndex += 1
            }
            
            stepIndex += 1
            removeTop += kFooterHeight
        }
        
        guard
            
            let image:UIImage = UIGraphicsGetImageFromCurrentImageContext()
            
        else
        {
            UIGraphicsEndImageContext()
            
            return
        }
        
        UIGraphicsEndImageContext()
        let sharingItems:[Any] = [image]
        
        share(items:sharingItems)
        viewSolution.endExporting()
    }
    
    private func share(items:[Any])

         
            self?.viewSolution.startExporting()
            
            DispatchQueue.global(qos:DispatchQoS.QoSClass.background).async
            { [weak self] in
                
                guard
                
                    let step:MLinearEquationsSolutionStep = self?.model.steps[stepIndex]
                
                else
                {
                    return
                }
                
                let steps:[MLinearEquationsSolutionStep] = [step]
                self?.shareStepsImage(steps:steps)
            }
        }
        
