为了实现 mapView 我尝试添加 <#import 和 MKMapViewDelegate 并尝试
这是我的代码:
- (void)viewDidLoad
{
mapView = [[MKMapView alloc]initWithFrame:CGRectMake(0, 0, 320, self.view.frame.size.height - 90)];
mapView.showsUserLocation = YES;
mapView.mapType = MKMapTypeHybrid;
mapView.delegate = self;
[self.view addSubview:mapView1];
[super viewDidLoad];
}
Run Code Online (Sandbox Code Playgroud)
体系结构 i386 的未定义符号:“_OBJC_CLASS_$_MKMapView”,引用自:maptryViewController.o ld 中的 objc-class-ref:未找到体系结构 i386 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v查看调用)
我犯了什么错误>?