我有一个奇怪的问题,我无法让这种方法做任何事情!我已经添加了地图视图委托,并在顶部AND头文件中取消了委托。我打算只得到回应,当用户触摸通过点击谷歌地图标记谷歌地图iOS SDK didTapInfoWindowOfMarker不能正常工作
这里产生的液泡是我
#import "ViewController.h"
#import "Location.h"
@interface ViewController() <GMSMapViewDelegate>
@property(nonatomic)NSMutableArray* storedLocations;
@property(nonatomic)NSMutableArray* myPlaces;
@end
@implementation ViewController {
GMSMapView *mapView;
}
- (void)mapView:(GMSMapView *)mapView didTapInfoWindowOfMarker:(GMSMarker *)marker{
UIAlertView* new = [[UIAlertView alloc] initWithTitle:@"Nice!" message:@"Good stuff" delegate:self cancelButtonTitle:@"Well Done!" otherButtonTitles:nil];
[new show];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Create Map View on scene with camera
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:0
longitude:0
zoom:0];
mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView.myLocationEnabled = YES;
self.view = mapView;
mapView.delegate = self;
截至此刻提到,触摸泡沫什么都不做
谢谢,当我回家时我会试试这个 – Harvey 2015-04-06 22:08:35