diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-03-24 18:43:24 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-03-24 18:43:24 -0700 |
commit | 10a30daed66ac1795ee9a0097e8aeb2e735e8968 (patch) | |
tree | 3c1a050fce8b282cab9eb771d0aa58c2e101387d /ios | |
parent | 3490622dd25cda45ec4d6804de397417e4e8f672 (diff) | |
download | qtlocation-mapboxgl-10a30daed66ac1795ee9a0097e8aeb2e735e8968.tar.gz |
refs #894, fixes #1074: callout views for iOS
Diffstat (limited to 'ios')
-rw-r--r-- | ios/app/MBXViewController.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm index 6d1175e4f1..2c7bfd6b40 100644 --- a/ios/app/MBXViewController.mm +++ b/ios/app/MBXViewController.mm @@ -21,7 +21,7 @@ static NSArray *const kStyleNames = @[ static NSString *const kStyleVersion = @"v7"; -@interface MBXViewController () <UIActionSheetDelegate, CLLocationManagerDelegate> +@interface MBXViewController () <UIActionSheetDelegate, CLLocationManagerDelegate, MGLMapViewDelegate> @property (nonatomic) MGLMapView *mapView; @property (nonatomic) CLLocationManager *locationManager; @@ -70,6 +70,8 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; self.mapView.viewControllerForLayoutGuides = self; + self.mapView.delegate = self; + self.view.tintColor = kTintColor; self.navigationController.navigationBar.tintColor = kTintColor; self.mapView.tintColor = kTintColor; @@ -338,6 +340,13 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; [self.locationManager stopUpdatingLocation]; } +#pragma mark - MGLMapViewDelegate + +- (BOOL)mapView:(MGLMapView *)mapView annotationCanShowCallout:(id <MGLAnnotation>)annotation +{ + return YES; +} + #pragma clang diagnostic pop @end |