//
//  Bundle+Ext.swift
//  BFFramework
//
//  Created by ak on 2021/6/2.
//  取 BFFramework 资源目录

import Foundation

public extension Bundle {
    // bf main bundle url
    func BF_mainbundle_URL() -> URL {
        guard let className = NSClassFromString("PQBaseViewController").self else {
            return Bundle.main.url(forResource: "BFCommonKit", withExtension: "bundle")!
        }
        let bundle: Bundle = Bundle(for: className.self)
        return bundle.url(forResource: "BFCommonKit", withExtension: "bundle")!
    }

    // bf main bundle
    func BF_mainbundle() -> Bundle {
        return Bundle(url: BF_mainbundle_URL())!
    }
}
