From 06d400fb9a9a4f612f9fcd8ddd7a68964d01e27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 20 Nov 2015 01:10:24 -0800 Subject: [PATCH] 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. --- include/mbgl/ios/MGLMapView.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 779faa4e9..83ef395cf 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -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;