summaryrefslogtreecommitdiff
path: root/platform/ios/src/UIColor+MGLAdditions.mm
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2018-05-07 12:01:29 -0400
committerGitHub <noreply@github.com>2018-05-07 12:01:29 -0400
commita425995189c3f4c9d9040b4acff477bfc96b6afd (patch)
treecf7b68e96f6eb9c0d8066151969c42bbfc0b4763 /platform/ios/src/UIColor+MGLAdditions.mm
parenta4892231544ccf6fcbe6dc233b5462f550cbbbcc (diff)
downloadqtlocation-mapboxgl-a425995189c3f4c9d9040b4acff477bfc96b6afd.tar.gz
[ios, macos] Add to-rgba expression operator. (#11725)
* [ios, macos] Add expression support to to-rgba operator. * [ios, macos] Update style docs. * [ios, macos] Refactored to-rgba to to-color. * [ios, macos] Add support for to-rgba expression operator. * [ios, macos] Add multiple parameters support to to-color operand. * [ios, macos] Enable to-rgba operator for MGLColor or key path expressions. * [ios, macos] Update predicates and expressions guide to reflect cast changes. * [ios, macos] Update changelogs. * [ios, macos] Clarify color casting usage.
Diffstat (limited to 'platform/ios/src/UIColor+MGLAdditions.mm')
-rw-r--r--platform/ios/src/UIColor+MGLAdditions.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/src/UIColor+MGLAdditions.mm b/platform/ios/src/UIColor+MGLAdditions.mm
index 9ca39acda4..7c1fbddc20 100644
--- a/platform/ios/src/UIColor+MGLAdditions.mm
+++ b/platform/ios/src/UIColor+MGLAdditions.mm
@@ -66,7 +66,7 @@
return [UIColor colorWithRed:[components[0].constantValue doubleValue] / 255.0
green:[components[1].constantValue doubleValue] / 255.0
blue:[components[2].constantValue doubleValue] / 255.0
- alpha:components.count == 3 ? [components[3].constantValue doubleValue] : 1.0];
+ alpha:components.count == 3 ? 1.0 : [components[3].constantValue doubleValue]];
}
@end