Created
January 26, 2017 20:31
-
-
Save petermolnar-dev/e5f015aa8e0b7f0c9eed21d5d11116c4 to your computer and use it in GitHub Desktop.
PMOPictureController.h - Block based solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <UIKit/UIKit.h> | |
@interface PMOPictureController : NSObject | |
/** | |
The designated initializer, the picture's url is mandatory to pass. | |
@param url The picture full url, as NSURL | |
@return An instance PMOPictureController. | |
*/ | |
- (nonnull instancetype)initWithPictureURL:(nonnull NSURL *)url NS_DESIGNATED_INITIALIZER; | |
/** | |
Start the asynchron download of the image. | |
*/ | |
- (void)downloadImage; | |
/** | |
A high level, public API function to retrieve the image as UIImage | |
@return an instance of UIImage. | |
*/ | |
- (nullable UIImage *)image; | |
/** | |
Removing the default initalizer | |
@return nil | |
*/ | |
- (nullable instancetype)init NS_UNAVAILABLE; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment