MPImageProvider

@interface MPImageProvider : NSObject

The image provider acts as a service for fetching images either online or cached offline. Only intended for png images.

  • Get an image from a web url

    Declaration

    Objective-C

    + (void)getImageFromUrlStringAsync:(NSString *)url
                     completionHandler:
                         (void (^)(UIImage *, NSError *))completionHandler;

    Swift

    class func getImageFromUrlStringAsync(_ url: String!, completionHandler: ((UIImage?, Error?) -> Void)!)

    Parameters

    url

    The web url as a string

    completionHandler

    Completion callback handler block that returns either an image or an error (either one will be nil)