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

Add category convenience methods to NSNumber for style values (was: Runtime styling properties are too loosely typed) #5970

@1ec5

Description

@1ec5

We currently use the MGLStyleAttributeValue protocol to allow any style attribute property to be set to the appropriate value type or an instance of MGLStyleAttributeFunction. While this approach is slightly more strongly typed than id, preventing the developer from setting a property to e.g. a UIButton, it doesn’t keep the developer from setting the property to an NSString where an NSNumber is expected or an NSArray where an NSValue is expected. The attribute properties’ types should be more specific, allowing the compiler to catch common developer errors.

/cc @frederoni @incanus @jfirebaugh

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions