You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Add NSExpression syntax for conditionals with multiple branches #11007
The NSExpression-based property value implementation in #10726 should support a more compact syntax for conditionals with multiple branches. Currently, an NSExpression containing a nested TERNARY gets converted into nested case expressions, and a case expression with multiple branches gets converted into a nested TERNARY structure. At least a nested TERNARY should be converted into a flat case.
@friedbunny pointed out that +[NSExpression expressionForConditional:trueExpression:falseExpression:] is unavailable in iOS 8.x, so the proposed syntax would be even more useful for developers that need to deploy back to that version.
Activity
1ec5 commentedon Feb 13, 2018
@friedbunny pointed out that
+[NSExpression expressionForConditional:trueExpression:falseExpression:]is unavailable in iOS 8.x, so the proposed syntax would be even more useful for developers that need to deploy back to that version.friedbunny commentedon Feb 13, 2018
Indeed, besides recommending
+[NSExpression expressionForConditional:trueExpression:falseExpression:]in the docs a couple times, we use it here:mapbox-gl-native/platform/darwin/src/NSExpression+MGLAdditions.mm
Line 477 in fb5b8d3
and here:
mapbox-gl-native/platform/darwin/test/MGLExpressionTests.mm
Line 580 in 44ca0a5
1ec5 commentedon Apr 12, 2018
Fixed in #11450 on the release-boba branch for iOS map SDK v4.0.0 and macOS map SDK v0.7.0.