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

Make MGLMapView IB_DESIGNABLE (for iOS XIBs) #929

Closed

Description

@1ec5

Developers who use XIBs or storyboards will find it more awkward to use MGLMapView than MKMapView because custom views such as MGLMapView are rendered as plain white squares by default:

ib
Left: MGLMapView. Right: MKMapView.

MGLMapView should be marked IB_DESIGNABLE and draw something recognizable inside Interface Builder. It would be impractical to load actual map content synchronously within the short timeout, but even something mimicking the MKMapView’s translucent “blue box” would be easier to work with.

Activity

  1. added
    iOS
    on Feb 28, 2015
  2. incanus commented on Feb 28, 2015

    @incanus
    Contributor

    👍

    I started playing around in this direction a few weeks back but only got as far as https://gist.github.com/incanus/867e487146bb9695065a. I got blocked there by GL project restructuring and the loss of a dynamic framework that would work in Swift (#828).

    https://twitter.com/incanus77/statuses/563748947043164160

  3. ljbade commented on Mar 2, 2015

    @ljbade
    Contributor

    Interesting Android has something similar for the UI editor: #650

  4. 1ec5 commented on Mar 2, 2015

    @1ec5
    ContributorAuthor

    Also, we should have the box draw a little reminder when the inspectable access token isn’t filled in.

  5. ljbade commented on Mar 3, 2015

    @ljbade
    Contributor

    @1ec5 great idea!

  6. DavidChouinard commented on Mar 23, 2015

    @DavidChouinard

    As a user: this would be very useful!

  7. DavidChouinard commented on Mar 23, 2015

    @DavidChouinard

    @1ec5 What's the expected inspectable key path? (accessToken does not seem to work)

  8. 1ec5 commented on Mar 23, 2015

    @1ec5
    ContributorAuthor

    accessToken doesn’t appear to be KVO-compliant at the moment. Additionally, if accessToken is unset, setting it should make the map use the default bundled style, just as -initWithFrame:styleJSON:accessToken: calls -setStyleJSON: with nil when there’s a token is specified.

  9. added this to the iOS Beta 2 milestone on Apr 1, 2015
  10. 1ec5 commented on Apr 1, 2015

    @1ec5
    ContributorAuthor

    untokenized
    tokenized
    default

  11. friedbunny commented on Apr 1, 2015

    @friedbunny
    Contributor

    Very nice. 🤘

  12. modified the milestones: iOS Beta 1, iOS Beta 2 on Apr 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

iOS

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions