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

Replace NSArray with more specific types in runtime styling API #5947

Closed
1ec5 opened this issue Aug 11, 2016 · 1 comment · Fixed by #6079
Closed

Replace NSArray with more specific types in runtime styling API #5947

1ec5 opened this issue Aug 11, 2016 · 1 comment · Fixed by #6079
Assignees
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS refactor runtime styling
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Aug 11, 2016

Per #5727 (comment), we should use types other than NSArray to represent fixed-length collections in the style specification:

/cc @frederoni @incanus

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor macOS Mapbox Maps SDK for macOS labels Aug 11, 2016
@1ec5 1ec5 added this to the ios-v3.4.0 milestone Aug 11, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Aug 11, 2016

Per #5727 (comment), the order inside NSEdgeInsets and UIEdgeInsets is reversed with respect to the order expected by mbgl and the style specification.

@1ec5 1ec5 self-assigned this Aug 18, 2016
1ec5 added a commit that referenced this issue Aug 18, 2016
An offset style attribute is now exposed publicly as an NSValue representing a CGVector instead of an NSArray of NSNumbers. A padding style attribute is now exposed publicly as an NSValue representing an NSEdgeInsets or UIEdgeInsets instead of an NSArray of NSNumbers. This change also fixes round-tripping of padding values due to a difference between the style specification and Foundation regarding the order of edges around a box. Used a designated initializer on NSEdgeInsets/UIEdgeInsets to ensure correct order when converting from C++ to Objective-C.

Fixes #5947, fixes #6065.
1ec5 added a commit that referenced this issue Aug 19, 2016
An offset style attribute is now exposed publicly as an NSValue representing a CGVector instead of an NSArray of NSNumbers. A padding style attribute is now exposed publicly as an NSValue representing an NSEdgeInsets or UIEdgeInsets instead of an NSArray of NSNumbers. This change also fixes round-tripping of padding values due to a difference between the style specification and Foundation regarding the order of edges around a box. Used a designated initializer on NSEdgeInsets/UIEdgeInsets to ensure correct order when converting from C++ to Objective-C.

Fixes #5947, fixes #6065.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS refactor runtime styling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants