             for:UIControlEvents.touchUpInside)
         
         addSubview(collectionView)
+        addSubview(viewControls)
         addSubview(buttonCheckAll)
         addSubview(buttonUncheckAll)
         addSubview(buttonTrash)

        collectionView.dataSource = self
        collectionView.delegate = self
        self.collectionView = collectionView
        
        let buttonCheckAll:UIButton = UIButton()
        buttonCheckAll.translatesAutoresizingMaskIntoConstraints = false

    
    //MARK: collectionView delegate
    
    func scrollViewDidScroll(_ scrollView:UIScrollView)
    {
        let offsetX:CGFloat = scrollView.contentOffset.x
        let rawControlsWidth:CGFloat = kControlsWidth - offsetX
        let controlsWidth:CGFloat
        
        if rawControlsWidth < 0
        {
            controlsWidth = 0
        }
        else
        {
            controlsWidth = rawControlsWidth
        }
        
        layoutControlsWidth.constant = controlsWidth
    }
    
    func collectionView(_ collectionView:UICollectionView, layout collectionViewLayout:UICollectionViewLayout, sizeForItemAt indexPath:IndexPath) -> CGSize
    {
        let height:CGFloat = collectionView.bounds.maxY
