diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-04-23 10:35:59 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-04-23 10:35:59 -0700 |
commit | 3e22369f27ba4a0b1273c8934bfb0f59d9aa96c5 (patch) | |
tree | 9f0faeb5af456dc559b48d114883b2f6771400ba /platform/ios/src/MGLMapView+IBAdditions.h | |
parent | 2d32336a41dac77b6182642b7067a23add12eb09 (diff) | |
download | qtlocation-mapboxgl-3e22369f27ba4a0b1273c8934bfb0f59d9aa96c5.tar.gz |
[ios, osx] Eliminated platform/{ios,osx}/include
Also updated various project references to be group-relative, so Xcode chooses the right directory by default when adding a new file.
Fixes #4770.
Diffstat (limited to 'platform/ios/src/MGLMapView+IBAdditions.h')
-rw-r--r-- | platform/ios/src/MGLMapView+IBAdditions.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/platform/ios/src/MGLMapView+IBAdditions.h b/platform/ios/src/MGLMapView+IBAdditions.h new file mode 100644 index 0000000000..f18df56e01 --- /dev/null +++ b/platform/ios/src/MGLMapView+IBAdditions.h @@ -0,0 +1,49 @@ +#import <Foundation/Foundation.h> + +#import "MGLTypes.h" + +@class MGLMapView; + +NS_ASSUME_NONNULL_BEGIN + +@interface MGLMapView (IBAdditions) + +// Core properties that can be manipulated in the Attributes inspector in +// Interface Builder. These redeclarations merely add the IBInspectable keyword. +// They appear here to ensure that they appear above the convenience properties; +// inspectables declared in MGLMapView.h are always sorted before those in +// MGLMapView+IBAdditions.h, due to ASCII sort order. + +#if TARGET_INTERFACE_BUILDER + +// HACK: We want this property to look like a URL bar in the Attributes +// inspector, but just calling it styleURL would violate Cocoa naming +// conventions and conflict with the existing NSURL property. Fortunately, IB +// strips out the two underscores for display. +@property (nonatomic, nullable) IBInspectable NSString *styleURL__; + +#endif // TARGET_INTERFACE_BUILDER + +// Convenience properties related to the initial viewport. These properties +// are not meant to be used outside of Interface Builder. latitude and longitude +// are backed by properties of type CLLocationDegrees, but these declarations +// must use the type double because Interface Builder is unaware that +// CLLocationDegrees is a typedef for double. + +@property (nonatomic) IBInspectable double latitude; +@property (nonatomic) IBInspectable double longitude; +@property (nonatomic) IBInspectable double zoomLevel; + +// Renamed properties. Interface Builder derives the display name of each +// inspectable from the runtime name, but runtime names don’t always make sense +// in UI. + +@property (nonatomic) IBInspectable BOOL allowsZooming; +@property (nonatomic) IBInspectable BOOL allowsScrolling; +@property (nonatomic) IBInspectable BOOL allowsRotating; +@property (nonatomic) IBInspectable BOOL allowsTilting; +@property (nonatomic) IBInspectable BOOL showsUserLocation; + +@end + +NS_ASSUME_NONNULL_END |