mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add init
This commit is contained in:
parent
9f36d5107e
commit
8dd3b32d90
2 changed files with 20 additions and 2 deletions
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue