Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
wip: use NS_..._OF macro
Browse files Browse the repository at this point in the history
  • Loading branch information
boundsj committed Feb 6, 2017
1 parent fbb8068 commit 3b90d85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLStyleValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ MGL_EXPORT
@param stops A dictionary associating zoom levels with style values.
@return An `MGLStyleFunction` object with the given stops.
*/
+ (instancetype)functionWithStops:(NSDictionary<id, MGLStyleValue<T> *> *)stops __attribute__((deprecated("Use +[MGLStyleValue valueWithInterpolationMode:cameraStops:options:]")));
+ (instancetype)functionWithStops:(NS_DICTIONARY_OF(NSNumber *, MGLStyleValue<T> *) *)stops __attribute__((deprecated("Use +[MGLStyleValue valueWithInterpolationMode:cameraStops:options:]")));

/**
Creates and returns an `MGLStyleFunction` object representing a camera function.
Expand All @@ -221,7 +221,7 @@ MGL_EXPORT
@param stops A dictionary associating zoom levels with style values.
@return An `MGLStyleFunction` object with the given interpolation base and stops.
*/
+ (instancetype)functionWithInterpolationBase:(CGFloat)interpolationBase stops:(NSDictionary<id, MGLStyleValue<T> *> *)stops __attribute__((deprecated("Use +[MGLStyleValue valueWithInterpolationMode:cameraStops:options:]")));
+ (instancetype)functionWithInterpolationBase:(CGFloat)interpolationBase stops:(NS_DICTIONARY_OF(NSNumber *, MGLStyleValue<T> *) *)stops __attribute__((deprecated("Use +[MGLStyleValue valueWithInterpolationMode:cameraStops:options:]")));

#pragma mark Initializing a Style Function

Expand All @@ -240,7 +240,7 @@ MGL_EXPORT
@param stops A dictionary associating zoom levels with style values.
@return An `MGLStyleFunction` object with the given interpolation base and stops.
*/
- (instancetype)initWithInterpolationBase:(CGFloat)interpolationBase stops:(NSDictionary<id, MGLStyleValue<T> *> *)stops NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithInterpolationBase:(CGFloat)interpolationBase stops:(NS_DICTIONARY_OF(NSNumber *, MGLStyleValue<T> *) *)stops NS_DESIGNATED_INITIALIZER;

#pragma mark Accessing the Parameters of a Function

Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/test/MGLStyleValueTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ extension MGLStyleValueTests {
var circleTranslationTwo = CGVector(dx: 0, dy: 0)
let circleTranslationValueTwo = NSValue(bytes: &circleTranslationTwo, objCType: "{CGVector=dd}")

let circleTranslationStops = [
let circleTranslationStops: [NSNumber: MGLStyleValue<NSValue>] = [
0: MGLStyleValue<NSValue>(rawValue: circleTranslationValueOne),
10: MGLStyleValue<NSValue>(rawValue: circleTranslationValueTwo)
]
let circleTranslationFunction = MGLStyleFunction(
let circleTranslationFunction = MGLStyleFunction<NSValue>(
interpolationBase: 1.0,
stops: circleTranslationStops
)
Expand Down

0 comments on commit 3b90d85

Please sign in to comment.