This commit is contained in:
Gregory John Casamento 2019-10-19 07:03:33 -04:00
parent 9f36d5107e
commit 8dd3b32d90
2 changed files with 20 additions and 2 deletions

View file

@ -33,9 +33,9 @@ extern "C" {
#include <Foundation/NSObject.h>
#include <Foundation/NSFormatter.h>
@class NSLocale, NSMeasurement, NSNumberFormatter, NSUnit;
@class NSLocale, NSMeasurement, NSNumberFormatter, NSUnit;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
enum {
NSMeasurementFormatterUnitOptionsProvidedUnit = (1UL << 0),

View file

@ -31,6 +31,24 @@
@implementation NSMeasurementFormatter
- (instancetype) init
{
self = [super init];
if(self != nil)
{
_unitOptions = NSMeasurementFormatterUnitOptionsProvidedUnit;
_unitStyle = NSFormattingUnitStyleMedium;
_locale = RETAIN([NSLocale currentLocale]);
}
return self;
}
- (void) dealloc
{
RELEASE(_locale);
[super dealloc];
}
- (NSMeasurementFormatterUnitOptions) unitOptions
{
return _unitOptions;