ImageLoader

@objcMembers public final class ImageLoader: NSObject

Helper class for loading images.

  • Returns an image with a given name in the main application bundle. As a fallback, it returns the image inside the associated bundle for the given class (typically, this will be the framework’s default bundle).

    Note

    Images are loaded via UIImage(imageNamed:), which means they are cached in the system by default after they are loaded.

    Declaration

    Swift

    public class func loadImage(named imageName: String, forClass anyClass: AnyClass) -> UIImage?

    Return Value

    The image, either from the main application bundle or the default bundle for the given class.