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

Commit

Permalink
Discourage code usage of styleURL__ property
Browse files Browse the repository at this point in the history
A hack atop the hack added in #2632. Pre-declare `styleURL__` with an attribute that prevents it from appearing in code completion suggestions, while leaving it available to Interface Builder, which is unable to parse attributes.
  • Loading branch information
1ec5 committed Nov 20, 2015
1 parent b3dbdb3 commit 8a0bce7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/mbgl/ios/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ IB_DESIGNABLE
* To display the default style, set this property to `nil`. */
@property (nonatomic, null_resettable) NSURL *styleURL;

/* Discourage programmatic usage of this IB-only property. Interface Builder skips over this declaration because it is unable to parse attributes. See the real declaration in MGLMapView+IBAdditions.h. */
@property (nonatomic, nullable) IBInspectable NSString *styleURL__ __attribute__((unavailable("styleURL__ is for use within Interface Builder only. Use styleURL in code.")));

/** Currently active style classes, represented as an array of string identifiers. */
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;

Expand Down

0 comments on commit 8a0bce7

Please sign in to comment.