diff --git a/VDS/Classes/BundleManager.swift b/VDS/Classes/BundleManager.swift index e7365b08..50537c0d 100644 --- a/VDS/Classes/BundleManager.swift +++ b/VDS/Classes/BundleManager.swift @@ -8,6 +8,8 @@ import Foundation import UIKit + +/// Bundle Manager keeps all bundles together for ease of use for searching within any of them for a specific asset public class BundleManager { public static var shared = BundleManager() @@ -28,6 +30,8 @@ public class BundleManager { }) } + /// With take a location and if found append to the local array for use later for asset searching. + /// - Parameter path: Location of the bundle public static func register(_ path: String) { if !shared.paths.contains(where: {$0 == path}) { if let bundle = Bundle(path: path) { @@ -40,6 +44,9 @@ public class BundleManager { extension BundleManager { + /// Searches through all registered bundles for an image + /// - Parameter name: Name of the image + /// - Returns: Will find an image or not. public func image(for name: String) -> UIImage? { var foundImage: UIImage?