好吧,我试着解释我的问题:
我从 GMSMapView 子类化了 MyMapView
@interface MyMapView : GMSMapView @end
现在我在 MyViewController.m 中使用 MyMapView 来显示 GMSMap 并设置委托 GMSMapViewDelegate。
@implementation MyViewController IBOutlet MyMapView *mapView; }
-(void)viewDidLoad { [super viewDidLoad]; GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; mapView = [MyMapView mapWithFrame:CGRectZero camera:camera]; self.view = mapView; mapView.delegate = self; }
在 MyViewController.hi 中声明了 GMSMapViewDelegate
@interface MyViewController : UIViewController <GMSMapViewDelegate> @end
现在我想在 MyViewController 中使用一些 GMSMapViewDelegate-Methods 但我尝试的所有方法都出错了。谁能解释我在这种情况下如何使用 GMSMapViewDelegate-Methods?
谢谢,格雷西。