<commit_before>
import UIKit

#if canImport(UIKit)

/// Saner implementation of `UISplitViewController` that manages navigation stacks for you.
/// To set a detail VC, call `showDetailViewController()` from any contained
/// viewController and it will be set as the detail (clearing out any shown detail if visible).
/// It will automatically add all the VCs  from the detail navigation stack onto the master
/// navigation stack when transitioning  to a compact environment.
@objc(BSWSplitViewController)
open class SplitViewController: UIViewController {
    
    public let masterNavigationController: UINavigationController
    public let detailNavigationController: UINavigationController
    private let emptyVC = EmptyViewController()
    
    public init(masterViewController: UIViewController) {
        self.masterNavigationController = MasterNavigationController(rootViewController: masterViewController)
        self.detailNavigationController = DetailNavigationController(rootViewController: emptyVC)
        super.init(nibName: nil, bundle: nil)
    }
    
    required public init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override public func loadView() {
        view = UIView()
        let separatorView = UIView()
        if #available(iOS 13.0, *) {
            separatorView.backgroundColor = .separator
        } else {
            separatorView.backgroundColor = .black
        }

        addChild(masterNavigationController)
        addChild(detailNavigationController)
        view.addAutolayoutSubview(masterNavigationController.view)
        view.addAutolayoutSubview(detailNavigationController.view)
        view.addAutolayoutSubview(separatorView)
        
        let idealWidthConstraint = masterNavigationController.view.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.3) // To be customized
        idealWidthConstraint.priority = .defaultHigh
        
        let minWidthConstraint = masterNavigationController.view.widthAnchor.constraint(greaterThanOrEqualToConstant: 320) // To be customized
        minWidthConstraint.priority = .required

        addConstraintsForHorizontal(<commit_msg>Make sure that ugly transparency is not visible on SplitVC<commit_after>
import UIKit

#if canImport(UIKit)

/// Saner implementation of `UISplitViewController` that manages navigation stacks for you.
/// To set a detail VC, call `showDetailViewController()` from any contained
/// viewController and it will be set as the detail (clearing out any shown detail if visible).
/// It will automatically add all the VCs  from the detail navigation stack onto the master
/// navigation stack when transitioning  to a compact environment.
@objc(BSWSplitViewController)
open class SplitViewController: UIViewController {
    
    public let masterNavigationController: UINavigationController
    public let detailNavigationController: UINavigationController
    private let emptyVC = EmptyViewController()
    
    public init(masterViewController: UIViewController) {
        self.masterNavigationController = MasterNavigationController(rootViewController: masterViewController)
        self.detailNavigationController = DetailNavigationController(rootViewController: emptyVC)
        super.init(nibName: nil, bundle: nil)
    }
    
    required public init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override public func loadView() {
        view = UIView()
        if #available(iOS 13.0, *) {
            view.backgroundColor = .systemBackground
        }
        let separatorView = UIView()
        if #available(iOS 13.0, *) {
            separatorView.backgroundColor = .separator
        } else {
            separatorView.backgroundColor = .black
        }

        addChild(masterNavigationController)
        addChild(detailNavigationController)
        view.addAutolayoutSubview(masterNavigationController.view)
        view.addAutolayoutSubview(detailNavigationController.view)
        view.addAutolayoutSubview(separatorView)
        
        let idealWidthConstraint = masterNavigationController.view.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.3) // To be customized
        idealWidthConstraint.priority = .defaultHigh
        
        let minWidthConstraint = masterNavigationController.view.widthAnchor.constraint(greaterThanOrEqualToConstant: 320) // To be customized
        minWidthConstraint.priority = .required

        addConstraintsForHorizontal(
{'fraction_non_alphanumeric': 0.06684315023163467, 'fraction_numerical': 0.004191484667990294, 'mean_word_length': 3.5522088353413657, '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': '2560699', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1051, 'n_words': 305}