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
enum SystolicRanges { | |
// In the Health App the range is set up between 40 and 300 | |
static let baseRange = 40...119 | |
static let normalRange = 120...129 | |
static let highNormalRange = 130...139 | |
static let mildHypertensionRange = 140...159 | |
static let moderateHypertensionRange = 160...179 | |
static let severeHyperTensionRange = 180...300 | |
case outOfRange | |
} |
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
enum SystolicRanges { | |
// In the Health App the range is set up between 40 and 300 | |
static let baseRange = 40...119 | |
static let normalRange = 120...129 | |
static let highNormalRange = 130...139 | |
static let mildHypertensionRange = 140...159 | |
static let moderateHypertensionRange = 160...179 | |
static let severeHyperTensionRange = 180...300 | |
case outOfRange | |
} |
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
enum SystolicRanges { | |
// In the Health App the range is set up between 40 and 300 | |
case baseRange = 40...119 | |
case normalRange = 120...129 | |
case highNormalRange = 130...139 | |
case mildHypertensionRange = 140...159 | |
case moderateHypertensionRange = 160...179 | |
case severeHyperTensionRange = 180...300 | |
case outOfRange | |
} |
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
enum SystolicRanges { | |
case baseRange | |
case normalRange | |
case highNormalRange | |
case mildHypertensionRange | |
case moderateHypertensionRange | |
case severeHyperTensionRange | |
case outOfRange | |
} |
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 "PMODownloader.h" | |
#import "PMODownloadNotifications.h" | |
@implementation PMODownloader | |
#pragma mark - Public API / Protocol implementation | |
- (void)downloadDataFromURL:(nonnull NSURL *)url completionHander:(void(^_Nonnull)(NSData * _Nullable downloadedData))callback { | |
NSURLRequest *request = [NSURLRequest requestWithURL:url]; |
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> | |
@interface PMODownloader : NSObject | |
//1 | |
/** | |
The download method, which triggers the download from the parameter url, and executes the passed block in case of the succesful download. | |
@param url the URL of the downloadable resource | |
@param callback the callback block, which will be executed with succesfull download |
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 "PMOPictureController.h" | |
#import "PMODownloader.h" | |
#import "PMOPictureWithURL.h" | |
#import "PMODownloadNotifications.h" | |
//1 | |
typedef void (^DownloadCallBack)(NSData *); | |
@interface PMOPictureController() |
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 |
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
@property (weak, nonatomic, nullable) id <PMOProgressDelegate> progressDelegate; | |
@property (unsafe_unretained, nonatomic) BOOL isAllModelParsed; | |
- (nullable instancetype)initWithModelControllers:(nullable NSArray <PMODrawModelController *>*) models NS_DESIGNATED_INITIALIZER; | |
- (nullable instancetype)init NS_UNAVAILABLE; | |
- (void)startPopulateDrawNumbersWithCompletionHandler:(void (^_Nonnull)(BOOL wasSuccessfull, NSArray <NSNumber*>* _Nullable numbers))callback; |
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
@interface MyObject() | |
@property (nonatomic) BOOL isNightMode | |
@property (strong, nonatomic) MyOtherObject *theObjectDoingSomethingElse | |
@end | |
@implementation MyObject | |
#pragma mark - Initializers | |
//2 | |
- (instancetype)initWithTheOtherObjectDoingSomethingElse:(MyOtherObject *)alreadyExisitingObject isNightModeOn:(BOOL)isNightMode { |