summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.h
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-10-10 15:56:43 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-10-17 11:47:22 -0700
commitcf5aa9c6488a1aef1ce5fd63488ead0a215029d4 (patch)
tree03ea0ebb6869bda2b39ef1d5a6cadeda55471d39 /platform/darwin/src/MGLStyleValue.h
parent9652028915af6602626939e0b0075333c34bfbfe (diff)
downloadqtlocation-mapboxgl-cf5aa9c6488a1aef1ce5fd63488ead0a215029d4.tar.gz
[ios, macos] Designated initializers
Added designated initializers to MGLStyleValue and friends. Restored custom equality and descriptions to MGLStyleFunction. Raise an exception if an unrecognized subclass of MGLStyleValue or MGLStyleValue itself is passed into a style attribute property.
Diffstat (limited to 'platform/darwin/src/MGLStyleValue.h')
-rw-r--r--platform/darwin/src/MGLStyleValue.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
index 1f19a5e028..010a0d68cb 100644
--- a/platform/darwin/src/MGLStyleValue.h
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -13,7 +13,9 @@
+ (instancetype)valueWithRawValue:(T)rawValue;
-- (instancetype)initWithRawValue:(T)rawValue;
+- (instancetype)init NS_UNAVAILABLE;
+
+- (instancetype)initWithRawValue:(T)rawValue NS_DESIGNATED_INITIALIZER;
@property (nonatomic) T rawValue;
@@ -22,9 +24,10 @@
@interface MGLStyleFunction<T> : MGLStyleValue
+ (instancetype)functionWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+
+ (instancetype)functionWithStops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
-- (instancetype)initWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops;
+- (instancetype)initWithBase:(CGFloat)base stops:(NSDictionary<NSNumber *, MGLStyleValue<T> *> *)stops NS_DESIGNATED_INITIALIZER;
@property (nonatomic) CGFloat base;
@property (nonatomic, copy) NSDictionary<NSNumber *, MGLStyleValue<T> *> *stops;