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

Commit 06d400f

Browse files
committed
Discourage code usage of styleURL__ property
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.
1 parent b791d1f commit 06d400f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/mbgl/ios/MGLMapView.h

+3
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ IB_DESIGNABLE
234234
* To display the default style, set this property to `nil`. */
235235
@property (nonatomic, null_resettable) NSURL *styleURL;
236236

237+
/* 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. */
238+
@property (nonatomic, nullable) IBInspectable NSString *styleURL__ __attribute__((unavailable("styleURL__ is for use within Interface Builder only. Use styleURL in code.")));
239+
237240
/** Currently active style classes, represented as an array of string identifiers. */
238241
@property (nonatomic) NS_ARRAY_OF(NSString *) *styleClasses;
239242

0 commit comments

Comments
 (0)