<commit_before>extension CollectionViewEditControllerNavigationDelegate where Self: UIViewController {
    func didSetBatchEditToolbarHidden(_ batchEditToolbarViewController: BatchEditToolbarViewController, isHidden: Bool, with items: [UIButton]) {
        
        let tabBar = self.tabBarController?.tabBar
        
        if batchEditToolbarViewController.parent == nil {
            addChildViewController(batchEditToolbarViewController)
            batchEditToolbarViewController.view.translatesAutoresizingMaskIntoConstraints = false
            view.addSubview(batchEditToolbarViewController.view)
            batchEditToolbarViewController.didMove(toParentViewController: self)
            
            let leadingConstraint = batchEditToolbarViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor)
            let trailingConstraint = batchEditToolbarViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor)
            let heightConstraint = batchEditToolbarViewController.view.heightAnchor.constraint(equalTo: bottomLayoutGuide.heightAnchor)
            let bottomConstraint = batchEditToolbarViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
            view.addConstraints([leadingConstraint, trailingConstraint, heightConstraint, bottomConstraint])
            
            // if a vc has no tab bar to cover the toolbar view, hide the toolbar view initally
            if tabBar == nil {
                batchEditToolbarViewController.view.alpha = 0
            }
        }

        UIView.transition(with: batchEditToolbarViewController.view, duration: 0.7, options: .transitionCrossDissolve, animations: {
            if let tabBar = tabBar {
                tabBar.alpha = isHidden ? 1 : 0
            } else {
                batchEditToolbarViewController.view.alpha = isHidden ? 0 : 1
            }
        }) { _ in
            if isHidden {
                batchEditToolbarViewController.view.removeFromSuperview()
                batchEditToolbarViewController.willMove(toParentViewController: nil)
                batchEditToolbarViewController.removeFromParentViewController()
            }<commit_msg>add allowAnimatedContent<commit_after>extension CollectionViewEditControllerNavigationDelegate where Self: UIViewController {
    func didSetBatchEditToolbarHidden(_ batchEditToolbarViewController: BatchEditToolbarViewController, isHidden: Bool, with items: [UIButton]) {
        
        let tabBar = self.tabBarController?.tabBar
        
        if batchEditToolbarViewController.parent == nil {
            addChildViewController(batchEditToolbarViewController)
            batchEditToolbarViewController.view.translatesAutoresizingMaskIntoConstraints = false
            view.addSubview(batchEditToolbarViewController.view)
            batchEditToolbarViewController.didMove(toParentViewController: self)
            
            let leadingConstraint = batchEditToolbarViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor)
            let trailingConstraint = batchEditToolbarViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor)
            let heightConstraint = batchEditToolbarViewController.view.heightAnchor.constraint(equalTo: bottomLayoutGuide.heightAnchor)
            let bottomConstraint = batchEditToolbarViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
            view.addConstraints([leadingConstraint, trailingConstraint, heightConstraint, bottomConstraint])
            
            // if a vc has no tab bar to cover the toolbar view, hide the toolbar view initally
            if tabBar == nil {
                batchEditToolbarViewController.view.alpha = 0
            }
        }

        UIView.transition(with: batchEditToolbarViewController.view, duration: 0.7, options: [.allowAnimatedContent, .transitionCrossDissolve], animations: {
            if let tabBar = tabBar {
                tabBar.alpha = isHidden ? 1 : 0
            } else {
                batchEditToolbarViewController.view.alpha = isHidden ? 0 : 1
            }
        }) { _ in
            if isHidden {
                batchEditToolbarViewController.view.removeFromSuperview()
                batchEditToolbarViewController.willMove(toParentViewController: nil)
                batchEditToolbarViewController.removeFromParentViewController()
            }
{'fraction_non_alphanumeric': 0.05983680870353581, 'fraction_numerical': 0.003173164097914778, 'mean_word_length': 2.954301075268817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2407653', 'n_tokens_mistral': 1022, 'n_tokens_neox': 976, 'n_words': 192}