iphone mapview上的远程pinimage
我想在地图视图中将远程图像显示为PIN。我尝试了这种方法,但不起作用iphone mapview上的远程pinimage,iphone,objective-c,annotations,mapkit,Iphone,Objective C,Annotations,Mapkit,我想在地图视图中将远程图像显示为PIN。我尝试了这种方法,但不起作用 annotationView.image = resizedImage; annotationView.opaque = NO; UIImageView *sfIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"here the image URL"]]; imageNamed从本地应用程序包中获取一个文件 你想要: UIImageView
annotationView.image = resizedImage;
annotationView.opaque = NO;
UIImageView *sfIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"here the image URL"]];
imageNamed从本地应用程序包中获取一个文件 你想要:
UIImageView *sfIconView = [[UIImageView alloc] initWithImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:@"here is the image URL"]]];
但我不建议这样做,因为这样会阻塞主UI线程。应该首先考虑为PIN异步加载图像数据。