diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-04-16 20:48:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 20:48:04 -0400 |
commit | cec46070c65161832edd995defc965e2a3add0ed (patch) | |
tree | c23ded1de0618ae4838335800be7943804740bd0 /platform/darwin/docs | |
parent | d06d77d482f03b9761007123a6bd88d873c27f8d (diff) | |
download | qtlocation-mapboxgl-cec46070c65161832edd995defc965e2a3add0ed.tar.gz |
[ios, macos] Add NSExpression convenience constructors and helper methods. (#11278)
* [ios, macos] Refactor convinience expression initializers.
# Conflicts:
# platform/darwin/src/NSExpression+MGLAdditions.h
# platform/darwin/src/NSExpression+MGLAdditions.mm
# platform/ios/app/MBXViewController.m
* [ios, macos] Add MGL_MATCH convenience method.
# Conflicts:
# platform/darwin/src/NSExpression+MGLAdditions.h
# platform/darwin/src/NSExpression+MGLAdditions.mm
# platform/darwin/test/MGLExpressionTests.mm
* [ios, macos] Add Swift friendly convenience methods name syntax..
# Conflicts:
# platform/darwin/src/NSExpression+MGLAdditions.h
* [ios, macos] Update runtime styling examples.
# Conflicts:
# platform/ios/app/MBXViewController.m
* [ios, macos] Add NSExpression variable expressions properties.
* [ios, macos] Clarify convenience initializer names.
* [ios, macos] Update Style Authors guides.
* [ios, macos] Fix cherry-pick merge.
* [ios, macos] Update convenience initializers documentation.
Diffstat (limited to 'platform/darwin/docs')
-rw-r--r-- | platform/darwin/docs/guides/For Style Authors.md.ejs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs index 4fa70ff807..a3083571cf 100644 --- a/platform/darwin/docs/guides/For Style Authors.md.ejs +++ b/platform/darwin/docs/guides/For Style Authors.md.ejs @@ -339,9 +339,9 @@ In style specification | Method, function, or predicate type | Format string syn `to-number` | `mgl_numberWithFallbackValues:` | `CAST(zipCode, 'NSNumber')` `to-string` | `stringValue` | `CAST(ele, 'NSString')` `typeof` | | -`geometry-type` | |`$geometryType` -`id` | |`$featureIdentifier` -`properties` | |`$featureProperties` +`geometry-type` | `NSExpression.geometryTypeVariableExpression` | `$geometryType` +`id` | `NSExpression.featureIdentifierVariableExpression` | `$featureIdentifier` +`properties` | `NSExpression.featurePropertiesVariableExpression` | `$featureProperties` `at` | `objectFrom:withIndex:` | `array[n]` `get` | `+[NSExpression expressionForKeyPath:]` | Key path `has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')` @@ -355,14 +355,14 @@ In style specification | Method, function, or predicate type | Format string syn `>=` | `NSGreaterThanOrEqualToPredicateOperatorType` | `key >= value` `all` | `NSAndPredicateType` | `p0 AND … AND pn` `any` | `NSOrPredicateType` | `p0 OR … OR pn` -`case` | `+[NSExpression expressionForConditional:trueExpression:falseExpression:]` or `MGL_IF` | `TERNARY(1 = 2, YES, NO)` or `MGL_IF(1 = 2, YES, 2 = 2, YES, NO)` +`case` | `+[NSExpression expressionForConditional:trueExpression:falseExpression:]` or `MGL_IF` or `+[NSExpression mgl_expressionForConditional:trueExpression:falseExpresssion:]` | `TERNARY(1 = 2, YES, NO)` or `MGL_IF(1 = 2, YES, 2 = 2, YES, NO)` `coalesce` | `mgl_coalesce:` | `mgl_coalesce({x, y, z})` -`match` | `MGL_MATCH` | `MGL_MATCH(x, 0, 'zero match', 1, 'one match', 'two match', 'default')` -`interpolate` | `mgl_interpolate:withCurveType:parameters:stops:` | -`step` | `mgl_step:withMinimum:stops:` | +`match` | `MGL_MATCH` or `+[NSExpression mgl_expressionForMatchingExpression:inDictionary:defaultExpression:]` | `MGL_MATCH(x, 0, 'zero match', 1, 'one match', 'two match', 'default')` +`interpolate` | `mgl_interpolate:withCurveType:parameters:stops:` or `+[NSExpression mgl_expressionForInterpolatingExpression:withCurveType:parameters:stops:]` | +`step` | `mgl_step:withMinimum:stops:` or `+[NSExpression mgl_expressionForSteppingExpression:fromExpression:stops:]` | `let` | `mgl_expressionWithContext:` | `MGL_LET('ios', 11, 'macos', 10.13, $ios + $macos)` `var` | `+[NSExpression expressionForVariable:]` | `$variable` -`concat` | `mgl_join:` | `mgl_join({'Old', ' ', 'MacDonald'})` +`concat` | `mgl_join:` or `-[NSExpression mgl_expressionByAppendingExpression:]` | `mgl_join({'Old', ' ', 'MacDonald'})` `downcase` | `lowercase:` | `lowercase('DOWNTOWN')` `upcase` | `uppercase:` | `uppercase('Elysian Fields')` <% if (macOS) { -%> @@ -398,8 +398,8 @@ In style specification | Method, function, or predicate type | Format string syn `sin` | | `sqrt` | `sqrt:` | `sqrt(2)` `tan` | | -`zoom` | | `$zoom` -`heatmap-density` | | `$heatmapDensity` +`zoom` | `NSExpression.zoomLevelVariableExpression` | `$zoom` +`heatmap-density` | `NSExpression.heatmapDensityVariableExpression` | `$heatmapDensity` For operators that have no corresponding `NSExpression` symbol, use the `MGL_FUNCTION()` format string syntax. |