I want to color my MGLSymbolStyleLayer feature icons based on multiple if conditions, which requires the use of MGL_IF, but I'm getting this runtime error: 'Unable to parse the format string...'
projectsLayer!.iconColor =
NSExpression(format: "MGL_IF(location_name IN %@, %@, location_name = United States, %@)",
uniqueLocations, savedColor, defaultColor)
Note, for something simple like this I can use a ternary operator and that's working fine for me. But I need to add multiple conditions for multiple colors and so I need to use MGL_IF or something similar.